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,
-
MessageDigestOutputStream(MessageDigest)
-
-
digest()
-
-
digestAsHash()
-
-
write(byte[])
- Writes an array of bytes to the message digestor
-
write(byte[], int, int)
- Writes a sub array of bytes to the message digestor.
-
write(int)
- Writes a byte to the message digestor.
MessageDigestOutputStream
public MessageDigestOutputStream(MessageDigest md0)
- Parameters:
- md0 - the message digestor that is uses to hash the data.
write
public final synchronized void write(int b)
- Writes a byte to the message digestor.
- Parameters:
- b - the byte
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
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
digest
public final byte[] digest()
- Returns:
- the final digest (as a byte array) of the data added and resets the digestor
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