Loading TOC...

MarkLogic Server 11.0 Product Documentation
xdmp:sha512

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

Summary

Calculates the SHA512 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:sha512("foo")
  => "f7fbba6e0636f890e56fbbf3283e524c6fa3204ae298382d624741d0dc6638326e\
      282c41be5e4254d8820772c5518a2c5a8c0c7f7eda19594a7eb539453e1ed7"
 

Example

  xdmp:sha512("foo", "base64")
  => "9/u6bgY2+JDlb7vzKD5STG+jIErimDgtYkdB0NxmODJuKCxBvl5CVNiCB3LFUYos\
      WowMf37aGVlKfrU5RT4e1w=="
 

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