License:
BSD style: see doc/license.txt for detailsVersion:
Initial release: Feb 2006Author:
Regan Heath, Oskar Linde This module defines the Digest interface.
1 2 3 4 5 6 7 8 9 10 11 | // create an MD5 hash algorithm Md5 hash = new Md5(); // process some data hash.update("The quick brown fox"); // process some more data hash.update(" jumps over the lazy dog"); // conclude algorithm and produce digest ubyte[] digest = hash.binaryDigest(); |
Remarks:
Updates the hash algorithm state with new dataParams:
buffer | a buffer can be supplied for the digest to be written to |
Remarks:
If the buffer is not large enough to hold the digest, a new buffer is allocated and returned. The algorithm state is always reset after a call to binaryDigest. Use the digestSize method to find out how large the buffer has to be.Returns:
the size of the digest in bytesRemarks:
Returns the size of the digest.Params:
buffer | a buffer can be supplied in which the digest will be written. It needs to be able to hold 2 * digestSize chars |
Remarks:
If the buffer is not large enough to hold the hex digest, a new buffer is allocated and returned. The algorithm state is always reset after a call to hexDigest.