public final class MacOutputStream extends OutputStream
| Constructor and Description |
|---|
MacOutputStream(Mac mac)
Base constructor - specify the MAC algorithm to use.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getMac()
Execute doFinal() and return the calculated MAC.
|
void |
write(byte[] bytes,
int off,
int len)
Write a block of data of length len starting at offset off in the byte array bytes to
the stream.
|
void |
write(int b)
Write a single byte to the stream.
|
close, flush, writepublic MacOutputStream(Mac mac)
mac - the MAC implementation to use as the basis of the stream.public void write(int b)
throws IOException
write in class OutputStreamb - the byte value to write.IOException - in case of failure.public void write(byte[] bytes,
int off,
int len)
throws IOException
write in class OutputStreambytes - byte array holding the data.off - offset into bytes that the data starts at.len - the length of the data block to write.IOException - in case of failure.public byte[] getMac()
Copyright © 2015–2021 The veraPDF Consortium. All rights reserved.