Changes

Jump to navigation Jump to search
444 bytes removed ,  02:52, 17 June 2012
no edit summary
|-
| width='90' | '''Signatures'''
|{{Func|util:md5|$value as xs:stringitem()|xs:hexBinary}}<br />
|-
| '''Summary'''
|Computes the MD5 hash of the given {{Code|$value}}, which may be a stringor a binary item (xs:base64Binary, xs:hexBinary).
|-
| '''Examples'''
|
* {{Code|util:md5("BaseX")}} returns {{Code|0D65185C9E296311C0A2200179E479A2}}.
|}
 
==util:md5-binary==
{|
|-
| width='90' | '''Signatures'''
|{{Func|util:md5-binary|$value as xs:base64Binary|xs:hexBinary}}<br />
|-
| '''Summary'''
|Computes the MD5 hash of the given binary item (xs:base64Binary, xs:hexBinary).
|-
| '''Examples'''
|
* {{Code|util:md5(xs:hexBinary(""))}} returns {{Code|D41D8CD98F00B204E9800998ECF8427E}}.
|}
|-
| width='90' | '''Signatures'''
|{{Func|util:sha1|$value as xs:stringitem()|xs:hexBinary}}<br />
|-
| '''Summary'''
|Computes the SHA-1 hash of the given {{Code|$value}}, which may be a stringor a binary item (xs:base64Binary, xs:hexBinary).
|-
| '''Examples'''
|
* {{Code|util:sha1("BaseX")}} returns {{Code|3AD5958F0F27D5AFFDCA2957560F121D0597A4ED}}.
* {{Code|util:sha1(xs:hexBinary(""))}} returns {{Code|DA39A3EE5E6B4B0D3255BFEF95601890AFD80709}}.
|}
==util:sha1-binarysha256==
{|
|-
| width='90' | '''Signatures'''
|{{Func|util:sha1-binarysha256|$value as xs:base64Binaryitem()|xs:hexBinary}}<br />
|-
| '''Summary'''
|Computes the SHA-1 256 hash of the given {{Code|$value}}, which may be a string or a binary item (xs:base64Binary, xs:hexBinary).
|-
| '''Examples'''
|
* {{Code|util:sha1sha256("BaseX")}} returns {{Code|15D570763DEB75D728BB69643392873B835CCCC94A2F1E881909DA47662821A3}}.* {{Code|util:sha256(xs:hexBinary(""))}} returns {{Code|DA39A3EE5E6B4B0D3255BFEF95601890AFD80709E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855}}.
|}
|-
| width='90' | '''Signatures'''
|{{Func|util:hash|$value as xs:string, $algorithm as xs:string|xs:hexBinary}}<br />|-| '''Summary'''|Computes the hash of the given string, using the specified {{Code|$algorithm}}.<br />The following algorithms are supported: {{Code|MD2}}, {{Code|MD5}}, {{Code|SHA-1}},{{Code|SHA-256}},{{Code|SHA-384}}, and {{Code|SHA-512}}.|-| '''Errors'''|{{Error|HASH0001|#Errors}} the specified hashing algorithm is unknown.|-| '''Examples'''|* {{Code|util:hashitem("", "MD5")}} returns {{Code|D41D8CD98F00B204E9800998ECF8427E}}.* {{Code|util:hash("", "")}} raises an error.|} ==util:hash-binary=={||-| width='90' | '''Signatures'''|{{Func|util:hash-binary|$value as basex:binary, $algorithm as xs:string|xs:hexBinary}}<br />
|-
| '''Summary'''
|Computes the hash of the given binary item (xs:base64Binary, xs:hexBinary){{Code|$value}}, using the specified {{Code|$algorithm}}.The specified values may be a string or a binary item (xs:base64Binary, xs:hexBinary)<br />The following algorithms three algorihms are supported: {{Code|MD2}}, {{Code|MD5}}, {{Code|SHA-1}},and {{Code|SHA-256}},{{Code|SHA-384}}, and {{Code|SHA-512}}.
|-
| '''Errors'''
| '''Examples'''
|
* {{Code|util:hash-binary(xs:base64Binarymd5(""), "MD5")}} returns {{Code|D41D8CD98F00B204E9800998ECF8427E}}.* {{Code|util:md5("", "")}} raises an error.
|}
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu