Hashing
The following functions perform hashing.
|
The server supports insecure hashing methods such as MD4, MD5 and SHA1. These functions are here for historical compatibility and completeness. They should not be used. |
All of the hash functions take arbitrary data, and return binary data
as octets.
List of Hash Functions
The following hashes are supported:
| Function | Description |
|---|---|
%hash.blake2b_512 |
BLAKE2b-512 |
%hash.blake2s_256 |
BLAKE2s-256 |
%hash.md4 |
MD4 |
%hash.md5 |
MD5 |
%hash.sha1 |
SHA1 |
%hash.sha224 |
SHA224 |
%hash.sha256 |
SHA256 |
%hash.sha384 |
SHA384 |
%hash.sha512 |
SHA512 |
%hash.sha2_224 |
SHA2-224 |
%hash.sha2_256 |
SHA2-256 |
%hash.sha2_384 |
SHA2-384 |
%hash.sha2_512 |
SHA2-512 |
%hash.sha3_224 |
SHA3-224 |
%hash.sha3_256 |
SHA3-256 |
%hash.sha3_384 |
SHA3-384 |
%hash.sha3_512 |
SHA3-512 |
Example
User-Name := "Caipirinha"
reply += {
Reply-Message = "The md5 of %{User-Name} in octal is %hash.md5(User-Name)"
Reply-Message = "The md5 of %{User-Name} in hex is %hex(%hash.md5(User-Name))"
}
Output
The md5 of Caipirinha in octal is \024\204\013md||\230\243\3472\3703\330n\251 The md5 of Caipirinha in hex is 14840b6d647c7c98a3e732f833d86ea9