<?xml version="1.0" encoding="UTF-8"?><api:function-page xml:base="/apidoc/8.0/xdmp.sha256.xml" generated="2015-10-07T16:36:00.016766-07:00" mode="javascript" xmlns:api="http://marklogic.com/rundmc/api"><api:function-name>xdmp.sha256</api:function-name><api:suggest>xdmp.sha256</api:suggest><api:suggest>xdmp</api:suggest><api:suggest>sha256</api:suggest><api:function-link mode="xquery" fullname="xdmp:sha256">/apidoc/8.0/xdmp:sha256.xml</api:function-link><api:function mode="javascript" name="sha256" type="builtin" lib="xdmp" category="Extension" subcategory="Extension" hidden="false" bucket="MarkLogic Built-In Functions" prefix="xdmp" namespace="http://marklogic.com/xdmp" fullname="xdmp.sha256"><api:summary>
  Calculates the SHA256 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.sha256("foo");
  =&gt; "2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae"
 </pre></api:example><api:example class="javascript"><pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
  xdmp.sha256("foo", "base64");
  =&gt; "LCa0a2j/xo/5m0U8HTBBNBNCLXBkg7+g+YpeiGJm564="
 </pre></api:example></api:function></api:function-page>