The md5 accessor generates an MD5 hash of the operand document.
The result is a document with a root element <md5> containing the md5 hash. Here is an example:
<md5>6BBE1AF635E1CFC43006390B791D710F</md5>
Note: The md5 accessor is ideal for hashing short sensitive documents such as passwords whose source document is
known to be reproducible. One must be cautious when using md5 with longer documents or when the result has undergone external
serialization.
The operand document is serialized using the default serializer. For documents generated and processed internally
it can be assumed that two identical documents will generate an identical hash value - it is therefore possible to use the
md5 accessor to hash passwords etc. It cannot be assumed that a document that has been externally serialized or in other ways
processed will generate a repeatable hash value. For documents that undergo external processing
the xsign accessor should be used in combination with
a canonical serializer
Example
Hash a password document
This crude example shows how the md5 accessor can be used to hash a short password document. We don't recommend
passwords in literals or sending the result to the response!!