digest

Syntax

%digest(method,cleartext)

method may be one of:
md2
md4
md5
ripemd160
sha1
sha256
sha384
sha512

Description

digest provides a flexible interface for the most common hashing algorithms. Hash results are hex encoded for convenience, and may be decoded to binary using %decode()

Example

%digest(sha512,hello)
9b71d224bd62f3785d96d46ad3ea3d73319bfbc2890caadae2dff72519673ca72323c3d99ba5c11d7c7acc6e14b8c5da0c4663475c2e5c3adef46f73bcdec043

results can also be converted to base64 encoding:

%encode(%decode(%digest(sha512,hello),hex),b64)
m3HSJL1i83hdltRq0+o9czGb+8KJDKra4t/3JRlnPKcjI8PZm6XBHXx6zG4UuMXaDEZjR1wuXDre9G9zvN7AQw==

(NOTE: perl's digest module strips off the "=" padding from
the end of its base64 encoded hashes. If you want perl
compatibility, you'll need to strip off the = at the end
in SMX, or add them back in perl.) 

See Also

sha | md5 | sha256 | encrypt | decrypt | obfuscate | deobfuscate | encode | decode