Hashing
The following functions perform hashing.
Note that 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 turn binary data as `octet`s.
List of Hash Functions
The following hashes are supported:
-
%hash.blake2b_512( … )
-
%hash.blake2s_256( … )
-
%hash.md4(…)
-
%hash.md5(…)
-
%hash.sha1( … }
-
%hash.sha224( … }
-
%hash.sha256( … }
-
%hash.sha384( … }
-
%hash.sha512( … }
-
%hash.sha2_224( … )
-
%hash.sha2_256( … )
-
%hash.sha2_384( … )
-
%hash.sha2_512( … )
-
%hash.sha3_224( … )
-
%hash.sha3_256( … )
-
%hash.sha3_384( … )
-
%hash.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