xdmp:sha256

xdmp:sha256(
   $data as item(),
   [$encoding as xs:string]
) as xs:string

Summary

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".

Example

  xdmp:sha256("foo")
  => "2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae"
 

Example

  xdmp:sha256("foo", "base64")
  => "LCa0a2j/xo/5m0U8HTBBNBNCLXBkg7+g+YpeiGJm564="
 
Powered by MarkLogic Server | Terms of Use | Privacy Policy