Package org.bouncycastle.crypto.io
Class MacOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- org.bouncycastle.crypto.io.MacOutputStream
-
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
public class MacOutputStream extends OutputStream
-
-
Constructor Summary
Constructors Constructor Description MacOutputStream(Mac mac)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]getMac()voidwrite(byte[] b, int off, int len)Writescountbytes from the byte arraybufferstarting at positionoffsetto this stream.voidwrite(int b)Writes a single byte to this stream.-
Methods inherited from class java.io.OutputStream
close, flush, write
-
-
-
-
Field Detail
-
mac
protected Mac mac
-
-
Constructor Detail
-
MacOutputStream
public MacOutputStream(Mac mac)
-
-
Method Detail
-
write
public void write(int b) throws IOExceptionDescription 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
public void write(byte[] b, int off, int len) throws IOExceptionDescription 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.
-
getMac
public byte[] getMac()
-
-