Provides a way to generate cryptographic hashes. More...
Import Statement: | import ArcGIS.AppFramework 1.0 |
Properties
- algorithm : Algorithm
- data : object
- error : string
- hexOutput : bool
- result : BinaryData
- resultValid : bool
Methods
- reset()
Detailed Description
The CryptographicHash component provides a method to generate cryptographic hashes of binary or text data according to a series of supported algorithms. There is no functionality within the AppFramework to decrypt these hashes once encrypted, as they are intended for communication with external systems such as the Amazon Web Services REST API.
This code sample demonstrates usage of CryptographicHash. Enter text into the TextField, and the hashed result will be automatically displayed in the TextArea.
Item { CryptographicHash { id: hashObj algorithm: CryptographicHash.Md4 data: input.text } Column { anchors.fill: parent TextField { id: input width: parent.width placeholderText: qsTr("Text to hash") } TextField { width: parent.width text: qsTr ("Hash: %1").arg(hashObj.result.data.toString()) readOnly: true } } }
Enumerations
Algorithm enumeration
This enum describes the cryptographic hashing algorithms that are supported. Informs the algorithm property.
Name | Value |
---|---|
CryptographicHash.Unknown | -1 |
CryptographicHash.Md4 | 0 |
CryptographicHash.Md5 | 1 |
CryptographicHash.Sha1 | 2 |
CryptographicHash.Sha_224 | 3 |
CryptographicHash.Sha_256 | 4 |
CryptographicHash.Sha_384 | 5 |
CryptographicHash.Sha_512 | 6 |
CryptographicHash.Keccak_224 | 7 |
CryptographicHash.Keccak_256 | 8 |
CryptographicHash.Keccak_384 | 9 |
CryptographicHash.Keccak_512 | 10 |
CryptographicHash.Sha3_224 | 11 |
CryptographicHash.Sha3_256 | 12 |
CryptographicHash.Sha3_384 | 13 |
CryptographicHash.Sha3_512 | 14 |
Property Documentation
[read-only] result : BinaryData |
Returns the final hash value after the hashing process.
Returns true if the result of the hashing process is valid. Otherwise, returns false.
Method Documentation
Resets the CryptographicHash object.