<?xml version="1.0" encoding="UTF-8"?><api:function-page xml:base="/apidoc/8.0/xdmp.md5.xml" generated="2015-10-07T16:36:00.016766-07:00" mode="javascript" xmlns:api="http://marklogic.com/rundmc/api"><api:function-name>xdmp.md5</api:function-name><api:suggest>xdmp.md5</api:suggest><api:suggest>xdmp</api:suggest><api:suggest>md5</api:suggest><api:function-link mode="xquery" fullname="xdmp:md5">/apidoc/8.0/xdmp:md5.xml</api:function-link><api:function mode="javascript" name="md5" type="builtin" lib="xdmp" category="Extension" subcategory="Extension" hidden="false" bucket="MarkLogic Built-In Functions" prefix="xdmp" namespace="http://marklogic.com/xdmp" fullname="xdmp.md5"><api:summary>
  Calculates the md5 hash of the given argument.
</api:summary><api:params><api:param name="data" type="item()"><api:param-description>
    Data to be hashed. Must be xs:string or a binary node.
  </api:param-description><api:param-name>data</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.md5("foo");
  =&gt; "acbd18db4cc2f85cedef654fccc4a4d8"
 </pre></api:example><api:example class="javascript"><pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
  xdmp.md5("foo", "base64");
  =&gt; "rL0Y20zC+Fzt72VPzMSk2A=="
 </pre></api:example></api:function></api:function-page>