Loading TOC...

MarkLogic Server 11.0 Product Documentation
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="
 

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.