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, flush
public MacOutputStream(Mac mac)
public static MacOutputStream streamFor(Key key) throws IOException
IOException
public String getResult()
public void write(int b) throws IOException
write
in class OutputStream
IOException
public void write(byte[] b) throws IOException
write
in class OutputStream
IOException
public void write(byte[] b, int off, int len) throws IOException
write
in class OutputStream
IOException
${project.version} - Copyright © 2003-2015 The Apache Software Foundation.