|
For the latest news and information visit The GNU Crypto project |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.io.InputStream java.io.FilterInputStream gnu.crypto.mac.MacInputStream
A filtering input stream that computes a MAC (message authentication code) over all data read from the stream.
Field Summary |
Fields inherited from class java.io.FilterInputStream |
in |
Constructor Summary | |
MacInputStream(java.io.InputStream in,
IMac mac)
Creates a new MacInputStream. |
Method Summary | |
IMac |
getMac()
Returns the MAC this stream is updating. |
void |
on(boolean flag)
Turns the digesting state on or off. |
int |
read()
|
int |
read(byte[] buf,
int off,
int len)
|
void |
setMac(IMac mac)
Sets the MAC this stream is updating, which must have already been initialized. |
Methods inherited from class java.io.FilterInputStream |
available, close, mark, markSupported, read, reset, skip |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MacInputStream(java.io.InputStream in, IMac mac)
in
- The underlying input stream.mac
- The mac instance to use.Method Detail |
public IMac getMac()
public void setMac(IMac mac)
mac
- The new MAC.
java.lang.NullPointerException
- If the argument is null.public void on(boolean flag)
flag
- The new digesting state.public int read() throws java.io.IOException
java.io.IOException
public int read(byte[] buf, int off, int len) throws java.io.IOException
java.io.IOException
|
For the latest news and information visit The GNU Crypto project |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |