Contents
cCryptoHash class
Provides functions for generating cryptographic hashes.
Note that all functions in this class are static, so they should be called in the dot convention:
local Hash = cCryptoHash.sha1HexString("DataToHash")
Each cryptographic hash has two variants, one returns the hash as a raw binary string, the other returns the hash as a hex-encoded string twice as long as the binary string.
Functions
Name | Parameters | Return value | Notes |
md5 |
Data |
string |
(STATIC) Calculates the md5 hash of the data, returns it as a raw (binary) string of 16 characters. |
md5HexString |
Data |
string |
(STATIC) Calculates the md5 hash of the data, returns it as a hex-encoded string of 32 characters. |
sha1 |
Data |
string |
(STATIC) Calculates the sha1 hash of the data, returns it as a raw (binary) string of 20 characters. |
sha1HexString |
Data |
string |
(STATIC) Calculates the sha1 hash of the data, returns it as a hex-encoded string of 40 characters. |
|