=Conventions=
{{Mark|Updated with Version 9.0}}:
All functions and errors in this module are assigned to the <code><nowiki>http://basex.org/modules/hash</nowiki></code> namespace, which is statically bound to the {{Code|hash}} prefix.<br/>
==hash:md5==
{| width='100%'
|-valign="top"| width='120' | '''SignaturesSignature'''|{{Func|<pre>hash:md5|( $value as xs:anyAtomicType|) as xs:base64Binary}}<br /pre>|-valign="top"
| '''Summary'''
|Computes the MD5 hash of the given {{Code|$value}}, which may be of type {{Code|xs:string}}, {{Code|xs:base64Binary}}, or {{Code|xs:hexBinary}}.|-valign="top"
| '''Examples'''
|
==hash:sha1==
{| width='100%'
|-valign="top"| width='120' | '''SignaturesSignature'''|{{Func|<pre>hash:sha1|( $value as xs:anyAtomicType|) as xs:base64Binary}}<br /pre>|-valign="top"
| '''Summary'''
|Computes the SHA-1 hash of the given {{Code|$value}}, which may be of type {{Code|xs:string}}, {{Code|xs:base64Binary}}, or {{Code|xs:hexBinary}}.|-valign="top"
| '''Examples'''
|
==hash:sha256==
{| width='100%'
|-valign="top"| width='120' | '''SignaturesSignature'''|{{Func|<pre>hash:sha256|( $value as xs:anyAtomicType|) as xs:base64Binary}}<br /pre>|-valign="top"
| '''Summary'''
|Computes the SHA-256 hash of the given {{Code|$value}}, which may be of type {{Code|xs:string}}, {{Code|xs:base64Binary}}, or {{Code|xs:hexBinary}}.|-valign="top"
| '''Examples'''
|
==hash:hash==
{| width='100%'
|-valign="top"| width='120' | '''SignaturesSignature'''|{{Func|<pre>hash:hash|( $value as xs:anyAtomicType, $algorithm as xs:string|) as xs:base64Binary}}<br /pre>|-valign="top"
| '''Summary'''
|Computes the hash of the given {{Code|$value}}, using the specified {{Code|$algorithm}}. The specified values may be of type {{Code|xs:string}}, {{Code|xs:base64Binary}}, or {{Code|xs:hexBinary}}.<br />The following three algorihms algorithms are supported: {{Code|MD5}}, {{Code|SHA-1}}, and {{Code|SHA-256}}.|-valign="top"
| '''Errors'''
|{{Error|algorithm|#Errors}} the specified hashing algorithm is unknown.
|-valign="top"
| '''Examples'''
|
=Errors=
{{Mark|Updated with Version 9.0}}:
{| class="wikitable" width="100%"
! width="110"|Code
|Description
|-valign="top"
|{{Code|algorithm}}
|The specified hash algorithm is unknown.