Package org.bouncycastle.crypto.io
Class DigestOutputStream
java.lang.Object
java.io.OutputStream
org.bouncycastle.crypto.io.DigestOutputStream
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
public class DigestOutputStream extends OutputStream
-
Field Summary
-
Constructor Summary
Constructors Constructor Description DigestOutputStream(Digest Digest) -
Method Summary
Methods inherited from class java.io.OutputStream
close, flush, write
-
Field Details
-
digest
-
-
Constructor Details
-
DigestOutputStream
-
-
Method Details
-
write
Description copied from class:OutputStreamWrites a single byte to this stream. Only the least significant byte of the integeroneByteis written to the stream.- Specified by:
writein classOutputStream- Parameters:
b- the byte to be written.- Throws:
IOException- if an error occurs while writing to this stream.
-
write
Description copied from class:OutputStreamWritescountbytes from the byte arraybufferstarting at positionoffsetto this stream.- Overrides:
writein classOutputStream- Parameters:
b- the buffer to be written.off- the start position inbufferfrom where to get bytes.len- the number of bytes frombufferto write to this stream.- Throws:
IOException- if an error occurs while writing to this stream.
-
getDigest
public byte[] getDigest()
-