Class java.crypt.MessageDigestOutputStream
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class java.crypt.MessageDigestOutputStream

java.crypt.MessageDigestOutputStream

public class MessageDigestOutputStream
This class is an Output stream that hashes the data sent to it using the message digest that it has been constructed with.
See Also:
MD5OutputStream,

Constructor Index

 o MessageDigestOutputStream(MessageDigest)

Method Index

 o digest()
 o digestAsHash()
 o write(byte[])
Writes an array of bytes to the message digestor
 o write(byte[], int, int)
Writes a sub array of bytes to the message digestor.
 o write(int)
Writes a byte to the message digestor.

Constructors

 o MessageDigestOutputStream
  public MessageDigestOutputStream(MessageDigest md0)
Parameters:
md0 - the message digestor that is uses to hash the data.

Methods

 o write
  public final synchronized void write(int b)
Writes a byte to the message digestor.
Parameters:
b - the byte
 o write
  public final void write(byte b[])
Writes an array of bytes to the message digestor
Parameters:
b - the data to be added to the hash
 o write
  public final void write(byte b[],
                          int off,
                          int len)
Writes a sub array of bytes to the message digestor.
Parameters:
b - the data to be added to the hash
off - the start offset in the data
len - the number of bytes that are written
 o digest
  public final byte[] digest()
Returns:
the final digest (as a byte array) of the data added and resets the digestor
 o digestAsHash
  public final MessageHash digestAsHash()
Returns:
the final digest (as an object) of the data added and resets the digestor

All Packages  Class Hierarchy  This Package  Previous  Next  Index