Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.java.security
Class MD5  view MD5 download MD5.java

java.lang.Object
  extended byorg.apache.java.security.MessageDigest
      extended byorg.apache.java.security.MD5

Deprecated. Use the java.security package.

public final class MD5
extends MessageDigest

This class implements the Message Digest 5 algorithm (MD5) as defined in RFC-1321.

Note: even if standard Java 1.1 APIs already provide a MD5 implementation, this class is used on those Java runtime environments (like Kaffe) where the package java.security is highly improbable to be found.

Version:
$Id: MD5.java 264148 2005-08-29 14:21:04Z henning $

Field Summary
private  byte[] buffer
          Deprecated.  
private  long counter
          Deprecated.  
private static java.lang.String[] digests
          Deprecated.  
private static java.lang.String[] messages
          Deprecated. Self Test
(package private) static byte[] padding
          Deprecated. MD5 Functions
private  int reminder
          Deprecated.  
private  int[] state
          Deprecated.  
private  int[] x
          Deprecated.  
 
Constructor Summary
MD5()
          Deprecated. Creates the algorithm and reset its state.
 
Method Summary
 void append(byte[] block, int offset, int length)
          Deprecated. Append another block of specified length to the message starting at the given offset.
private static void byte2int(byte[] in, int[] out)
          Deprecated. Converts a 64-byte array into a 16-int array.
 byte[] digest(byte[] block, int offset, int length)
          Deprecated. Appends a message block with specified length starting from the given offset, and return its message digest.
private static int F(int x, int y, int z)
          Deprecated.  
private static int FF(int a, int b, int c, int d, int x, int s, int ac)
          Deprecated.  
private static int G(int x, int y, int z)
          Deprecated.  
private static int GG(int a, int b, int c, int d, int x, int s, int ac)
          Deprecated.  
private static int H(int x, int y, int z)
          Deprecated.  
private static int HH(int a, int b, int c, int d, int x, int s, int ac)
          Deprecated.  
private static int I(int x, int y, int z)
          Deprecated.  
private static int II(int a, int b, int c, int d, int x, int s, int ac)
          Deprecated.  
private static void int2byte(int[] in, byte[] out)
          Deprecated. Converts a 4-int array into a 16-byte array.
static void main(java.lang.String[] ignored)
          Deprecated.  
 void reset()
          Deprecated. Resets the state of the class.
static byte[] toBytes(long n)
          Deprecated. Converts a long to a 8-byte array using low order first.
private  void transform(byte[] buffer)
          Deprecated.  
 
Methods inherited from class org.apache.java.security.MessageDigest
append, append, digest, digest
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

counter

private long counter
Deprecated. 

reminder

private int reminder
Deprecated. 

buffer

private byte[] buffer
Deprecated. 

state

private int[] state
Deprecated. 

x

private int[] x
Deprecated. 

padding

static byte[] padding
Deprecated. 
MD5 Functions


messages

private static java.lang.String[] messages
Deprecated. 
Self Test


digests

private static java.lang.String[] digests
Deprecated. 
Constructor Detail

MD5

public MD5()
Deprecated. 
Creates the algorithm and reset its state.

Method Detail

append

public void append(byte[] block,
                   int offset,
                   int length)
Deprecated. 
Append another block of specified length to the message starting at the given offset.

Specified by:
append in class MessageDigest

byte2int

private static void byte2int(byte[] in,
                             int[] out)
Deprecated. 
Converts a 64-byte array into a 16-int array.


digest

public byte[] digest(byte[] block,
                     int offset,
                     int length)
Deprecated. 
Appends a message block with specified length starting from the given offset, and return its message digest.

Specified by:
digest in class MessageDigest

F

private static int F(int x,
                     int y,
                     int z)
Deprecated. 

FF

private static int FF(int a,
                      int b,
                      int c,
                      int d,
                      int x,
                      int s,
                      int ac)
Deprecated. 

G

private static int G(int x,
                     int y,
                     int z)
Deprecated. 

GG

private static int GG(int a,
                      int b,
                      int c,
                      int d,
                      int x,
                      int s,
                      int ac)
Deprecated. 

H

private static int H(int x,
                     int y,
                     int z)
Deprecated. 

HH

private static int HH(int a,
                      int b,
                      int c,
                      int d,
                      int x,
                      int s,
                      int ac)
Deprecated. 

I

private static int I(int x,
                     int y,
                     int z)
Deprecated. 

II

private static int II(int a,
                      int b,
                      int c,
                      int d,
                      int x,
                      int s,
                      int ac)
Deprecated. 

int2byte

private static void int2byte(int[] in,
                             byte[] out)
Deprecated. 
Converts a 4-int array into a 16-byte array.


main

public static final void main(java.lang.String[] ignored)
Deprecated. 

reset

public void reset()
Deprecated. 
Resets the state of the class. Beware: calling this method erases all data previously inserted.

Specified by:
reset in class MessageDigest

toBytes

public static byte[] toBytes(long n)
Deprecated. 
Converts a long to a 8-byte array using low order first.


transform

private void transform(byte[] buffer)
Deprecated.