xdmp.sha256( data as Item, [encoding as String] ) as String
Calculates the SHA256 hash of the given argument.
Parameters | |
---|---|
data | Data to be hashed. Must be xs:string or a binary node. |
encoding | Encoding format for the output string, must be "hex" for hexadecimal or "base64". Default is "hex". |
xdmp.sha256("foo"); => "2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae"
xdmp.sha256("foo", "base64"); => "LCa0a2j/xo/5m0U8HTBBNBNCLXBkg7+g+YpeiGJm564="
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.