|
Bouncy Castle Cryptography Library 1.81 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.OutputStream
org.bouncycastle.jcajce.io.MacOutputStream
An output stream which calculates a MAC based on the data that is written to it.
| Constructor Summary | |
MacOutputStream(javax.crypto.Mac mac)
Base constructor - specify the MAC algorithm to use. |
|
| Method Summary | |
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. |
| Methods inherited from class java.io.OutputStream |
close, flush, write |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public MacOutputStream(javax.crypto.Mac mac)
mac - the MAC implementation to use as the basis of the stream.| Method Detail |
public void write(int b)
throws java.io.IOException
b - the byte value to write.
java.io.IOException - in case of failure.
public void write(byte[] bytes,
int off,
int len)
throws java.io.IOException
bytes - byte array holding the data.off - offset into bytes that the data starts at.len - the length of the data block to write.
java.io.IOException - in case of failure.public byte[] getMac()
|
Bouncy Castle Cryptography Library 1.81 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||