SHA or MD5 Hash
Function calculating a SHA or MD5 digest hash
Evaluation
This expression evaluates to a function of the form:
(x) -> any
The function calculates the digest of argument x using the selected algorithm and returns it as a binary value or a hex string.
Processing
The returned function calculates the digest of argument x as follows:
- If
xisnil,nilis returned. - If
xis of typebinarythe digest of its bytes is returned. - If
xis of typestringthe digest of the UTF-8 bytes of the string is returned. - If
xis of a type that can be cast to string - such as numeric types - it is cast to string and the digest of the UTF-8 bytes of the string is returned. - If
xcannot be cast to string, an error is thrown.
Settings
| Name | Type | Description |
|---|---|---|
Algorithm |
string |
The following algorithms are supported:
|
Result Format |
string |
The hashing function can return the hash digest in the following forms:
|