All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class cryptix.provider.md.MD5

java.lang.Object
   |
   +----java.security.MessageDigest
           |
           +----cryptix.provider.md.BlockMessageDigest
                   |
                   +----cryptix.provider.md.MD5

public final class MD5
extends BlockMessageDigest
implements Cloneable
This class implements the MD5 message digest algorithm.

References:

  1. Bruce Schneier, "Section 18.5 MD5," Applied Cryptography, 2nd edition, John Wiley & Sons, 1996

  2. RFC 1321 [need complete reference]

Copyright © 1995-1997 Systemics Ltd on behalf of the Cryptix Development Team.
All rights reserved.

$Revision: 1.5 $

Author:
Systemics Ltd, David Hopwood

Constructor Index

 o MD5()
The public constructor.

Method Index

 o engineDigest(byte[], int)
Returns the digest of the data added and resets the digest.
 o engineGetDataLength()
Returns the length of the data (in bytes) hashed in every transform.
 o engineGetDigestLength()
Returns the length of the hash (in bytes).
 o engineReset()
Initializes (resets) the message digest.
 o engineTransform(byte[])
Adds data to the message digest.
 o F(int, int, int)
 o FF(int, int, int, int, int, int, int)
 o G(int, int, int)
 o GG(int, int, int, int, int, int, int)
 o H(int, int, int)
 o HH(int, int, int, int, int, int, int)
 o I(int, int, int)
 o II(int, int, int, int, int, int, int)
 o main(String[])
Entry point for self_test.
 o self_test()
Do some basic tests.
 o transform(int[])

Constructors

 o MD5
 public MD5()
The public constructor.

Methods

 o engineGetDigestLength
 protected int engineGetDigestLength()
Returns the length of the hash (in bytes).

 o engineGetDataLength
 protected int engineGetDataLength()
Returns the length of the data (in bytes) hashed in every transform.

Overrides:
engineGetDataLength in class BlockMessageDigest
 o engineReset
 protected void engineReset()
Initializes (resets) the message digest.

Overrides:
engineReset in class BlockMessageDigest
 o engineTransform
 protected void engineTransform(byte in[])
Adds data to the message digest.

Parameters:
data - The data to be added.
offset - The start of the data in the array.
length - The amount of data to add.
Overrides:
engineTransform in class BlockMessageDigest
 o engineDigest
 protected byte[] engineDigest(byte in[],
                               int length)
Returns the digest of the data added and resets the digest.

Returns:
the digest of all the data added to the message digest as a byte array.
Overrides:
engineDigest in class BlockMessageDigest
 o F
 protected static int F(int x,
                        int y,
                        int z)
 o G
 protected static int G(int x,
                        int y,
                        int z)
 o H
 protected static int H(int x,
                        int y,
                        int z)
 o I
 protected static int I(int x,
                        int y,
                        int z)
 o FF
 protected static int FF(int a,
                         int b,
                         int c,
                         int d,
                         int k,
                         int s,
                         int t)
 o GG
 protected static int GG(int a,
                         int b,
                         int c,
                         int d,
                         int k,
                         int s,
                         int t)
 o HH
 protected static int HH(int a,
                         int b,
                         int c,
                         int d,
                         int k,
                         int s,
                         int t)
 o II
 protected static int II(int a,
                         int b,
                         int c,
                         int d,
                         int k,
                         int s,
                         int t)
 o transform
 protected void transform(int M[])
 o main
 public static final void main(String argv[])
Entry point for self_test.

 o self_test
 public static final void self_test() throws Exception
Do some basic tests. Three of the validation data are included only, no output, success or exception. If you want more, write a test program!

See Also:
UnitMD5

All Packages  Class Hierarchy  This Package  Previous  Next  Index