Class MacOutputStream
java.lang.Object
java.io.OutputStream
org.apache.tapestry5.internal.util.MacOutputStream
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
An output stream that wraps around a
Mac
(message authentication code algorithm). This is currently
used for symmetric (private) keys, but in theory could be used with assymetric (public/private) keys.- Since:
- 5.3.6
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionShould 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
void
write
(byte[] b) void
write
(byte[] b, int off, int len) void
write
(int b) Methods inherited from class java.io.OutputStream
close, flush, nullOutputStream
-
Constructor Details
-
MacOutputStream
-
-
Method Details
-
streamFor
- Throws:
IOException
-
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.- Returns:
- Base64 encoded MAC result
-
write
- Specified by:
write
in classOutputStream
- Throws:
IOException
-
write
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
write
- Overrides:
write
in classOutputStream
- Throws:
IOException
-