MessageDigests: - Secure one way hash algorithms. If the salt is not _NULL it will be appended to the end of the string.
SHA-256
SHA-384
SHA-512
SHA-1
MD2
MD5
Ciphers- Secure encryption using a key. The salt is the encryption key, either in PEM format or as a raw string. The required format and length will depend on the encryption algorithm. Algorithm names can also include 'transformations' which further refine the encryption operation.
AES
AES/CBC/PKCS5Padding
Blowfish
DES
DESede
DESede/ECB/PKCS5Padding
ECIES
RC2
RC4
RC5
RSA
HMACs- Message authentication codes. The salt is the encryption key as a raw string.
HmacMD5
HmacSHA1
HmacSHA224
HmacSHA256
HmacSHA384
HmacSHA512
Signature - Cryptographic signing algorithms. The salt is the private key either in PEM format or as a raw string. The required format and length will depend on the encryption algorithm.
HEX - output hex-encoded string of the binary data
BASE64 - base64 encoded string of the binary data
URL - url safe version of the base64 encoded string of the binary data
JWT - url safe encoding without padding of the base64 encoded string of the binary data
MIME - mime version of the base64 encoded string of the binary data
Two output formats are supported. The default is HEX encoding of the bytes. Alternatively, Base64 encoding of the resultant value can be requested using one of the values specified for base64Encode.
Examples
Basic Hash
hash("SHA-256", _NULL, "testValue")
Takes the string testValue, uses SHA-256 algorithm to convert it to a hashed string. No salt is added. Returns the value: 82fe0c834cbea069013c5eb7828e599a693e0d2411887e2ab273271662973082