public class MacOutputStream extends OutputStream
Mac (message authentication code algorithm). This is currently
used for symmetric (private) keys, but in theory could be used with assymetric (public/private) keys.| Constructor and Description |
|---|
MacOutputStream(Mac mac) |
| Modifier and Type | Method and Description |
|---|---|
String |
getResult()
Should only be invoked once, immediately after this stream is closed; it generates the final MAC result, and
returns it as a Base64 encoded string.
|
static MacOutputStream |
streamFor(Key key) |
void |
write(byte[] b) |
void |
write(byte[] b,
int off,
int len) |
void |
write(int b) |
close, flushpublic MacOutputStream(Mac mac)
public static MacOutputStream streamFor(Key key) throws IOException
IOExceptionpublic String getResult()
public void write(int b) throws IOException
write in class OutputStreamIOExceptionpublic void write(byte[] b) throws IOException
write in class OutputStreamIOExceptionpublic void write(byte[] b, int off, int len) throws IOException
write in class OutputStreamIOException5.6.4 - Copyright © 2003-2021 The Apache Software Foundation.