Class cryptix.security.MessageDigestOutputStream
All Packages Class Hierarchy This Package Previous Next Index
Class cryptix.security.MessageDigestOutputStream
java.lang.Object
|
+----java.io.OutputStream
|
+----cryptix.security.MessageDigestOutputStream
- public class MessageDigestOutputStream
- extends OutputStream
This class is an output stream that hashes the data sent to it using
the message digest that it has been constructed with.
References
Copyright © 1995, 1996, 1997
Systemics Ltd
on behalf of the
Cryptix Development Team.
All rights reserved.
- Author:
- Systemics Ltd
- See Also:
- MessageDigest, SHAOutputStream, MD5OutputStream
-
MessageDigestOutputStream(MessageDigest)
-
-
digest()
- Completes the digest and resets.
-
digestAsHash()
- Completes the digest and resets.
-
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
- Overrides:
- write in class OutputStream
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
- Overrides:
- write in class OutputStream
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
- Overrides:
- write in class OutputStream
digest
public final byte[] digest()
- Completes the digest and resets.
- Returns:
- the final digest (as a byte array) of the data added
digestAsHash
public final MessageHash digestAsHash()
- Completes the digest and resets.
- Returns:
- the final digest (as a Hash object) of the data added
All Packages Class Hierarchy This Package Previous Next Index