gnu.crypto.hash
public class MD2 extends BaseHash
An implementation of the MD2 message digest algorithm.
MD2 is not widely used. Unless it is needed for compatibility with existing systems, it is not recommended for use in new applications.
References:
Version: $Revision: 1.6 $
| Constructor Summary | |
|---|---|
| MD2() Creates a new MD2 digest ready for use. | |
| Method Summary | |
|---|---|
| Object | clone() |
| protected byte[] | getResult() |
| protected byte[] | padBuffer() Generates an array of padding bytes. |
| protected void | resetContext() |
| boolean | selfTest() |
| protected void | transform(byte[] in, int off) Adds |
Generates an array of padding bytes. The padding is defined as
i bytes of value i, where i is the
number of bytes to fill the last block of the message to
BLOCK_LENGTH bytes (or BLOCK_LENGTH bytes when
the last block was completely full).
Returns: the bytes to pad the remaining bytes in the buffer before completing a hash operation.
Adds BLOCK_LENGTH bytes to the running digest.
Parameters: in the byte array to take the BLOCK_LENGTH bytes from. off the offset to start from in the given byte array.