<?xml version="1.0" encoding="UTF-8"?><api:function-page xml:base="/apidoc/8.0/xdmp.hmacSha1.xml" generated="2015-10-07T16:36:00.016766-07:00" mode="javascript" xmlns:api="http://marklogic.com/rundmc/api"><api:function-name>xdmp.hmacSha1</api:function-name><api:suggest>xdmp.hmacsha1</api:suggest><api:suggest>xdmp</api:suggest><api:suggest>hmacsha1</api:suggest><api:function-link mode="xquery" fullname="xdmp:hmac-sha1">/apidoc/8.0/xdmp:hmac-sha1.xml</api:function-link><api:function mode="javascript" name="hmacSha1" type="builtin" lib="xdmp" category="Extension" subcategory="Extension" hidden="false" bucket="MarkLogic Built-In Functions" prefix="xdmp" namespace="http://marklogic.com/xdmp" fullname="xdmp.hmacSha1"><api:summary>
  Calculates the Hash-based Message Authentication Code (HMAC) using the SHA1 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.hmacSha1("foo", "bar");
  =&gt; "46b4ec586117154dacd49d664e5d63fdc88efb51"
 </pre></api:example><api:example class="javascript"><pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
  xdmp.hmacSha1("foo", "bar", "base64");
  =&gt; "RrTsWGEXFU2s1J1mTl1j/ciO+1E="
 </pre></api:example></api:function></api:function-page>