package java.io;
public class SHAOutputStream
extends OutputStream
{
public SHAOutputStream();
public void write(int);
public native void write(byte [],int,int);
public native void reset();
public native byte[] getHash();
}
Make a new secure hash stream with new SHAOutputStream.The
write method appends a byte to the buffer to be hashed.The second
write method accepts arrays or parts of arrays.The
reset method reinitializes the hash to its initial value. Values from all previous write method calls are discarded.The
getHash method returns the 20 byte array containing the hash value. Offset 0 in the array contains the most significant byte of the hash. SHA defines the result as 5 32 bit values but bytes are more convenient for writing and reading.