<?xml version="1.0" encoding="UTF-8"?><api:function-page xml:base="/apidoc/8.0/xdmp.hmacSha512.xml" generated="2015-10-07T16:36:00.016766-07:00" mode="javascript" xmlns:api="http://marklogic.com/rundmc/api"><api:function-name>xdmp.hmacSha512</api:function-name><api:suggest>xdmp.hmacsha512</api:suggest><api:suggest>xdmp</api:suggest><api:suggest>hmacsha512</api:suggest><api:function-link mode="xquery" fullname="xdmp:hmac-sha512">/apidoc/8.0/xdmp:hmac-sha512.xml</api:function-link><api:function mode="javascript" name="hmacSha512" type="builtin" lib="xdmp" category="Extension" subcategory="Extension" hidden="false" bucket="MarkLogic Built-In Functions" prefix="xdmp" namespace="http://marklogic.com/xdmp" fullname="xdmp.hmacSha512"><api:summary>
  Calculates the Hash-based Message Authentication Code (HMAC) using the SHA512   hash function of the given secret key and message arguments.
</api:summary><api:params><api:param name="secretkey" type="item()"><api:param-description>
    The secret key. Must be xs:string or a binary node.
  </api:param-description><api:param-name>secretkey</api:param-name><api:param-type>String</api:param-type></api:param><api:param name="message" type="item()"><api:param-description>
    Message to be authenticated. Must be xs:string or a binary node.
  </api:param-description><api:param-name>message</api:param-name><api:param-type>String</api:param-type></api:param><api:param name="encoding" type="xs:string" optional="true"><api:param-description>
    Encoding format for the output string, must be "hex" for hexadecimal
    or "base64". Default is "hex".
  </api:param-description><api:param-name>encoding</api:param-name><api:param-type>String</api:param-type></api:param></api:params><api:return>String</api:return><api:example class="javascript"><pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
  xdmp.hmacSha512("foo", "bar");
  =&gt; "114682914c5d017dfe59fdc804118b56a3a652a0b8870759cf9e792ed7426b08197076\
      bf7d01640b1b0684df79e4b67e37485669e8ce98dbab60445f0db94fce"
 </pre></api:example><api:example class="javascript"><pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
  xdmp.hmacSha512("foo", "bar", "base64");
  =&gt; "EUaCkUxdAX3+Wf3IBBGLVqOmUqC4hwdZz555LtdCawgZcHa/fQFkCxsGhN955LZ\
      +N0hWaejOmNurYERfDblPzg=="
 </pre></api:example></api:function></api:function-page>