Class IVSplittingOutputStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
org.apache.xml.security.stax.impl.util.IVSplittingOutputStream
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
IV splitting from the first few bytes in the stream.
When the iv is completely received the cipher will be initialized
and this output stream will be removed from chain of output streams
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Cipher
private final byte[]
private final int
private int
private ReplaceableOuputStream
private final Key
Fields inherited from class java.io.FilterOutputStream
out
-
Constructor Summary
ConstructorsConstructorDescriptionIVSplittingOutputStream
(OutputStream out, Cipher cipher, Key secretKey, int ivLength) -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
getIv()
private void
boolean
void
setParentOutputStream
(ReplaceableOuputStream replaceableOuputStream) void
write
(byte[] b) void
write
(byte[] b, int off, int len) void
write
(int b) Methods inherited from class java.io.FilterOutputStream
close, flush
Methods inherited from class java.io.OutputStream
nullOutputStream
-
Field Details
-
replaceableOuputStream
-
iv
private final byte[] iv -
ivLength
private final int ivLength -
pos
private int pos -
cipher
-
secretKey
-
-
Constructor Details
-
IVSplittingOutputStream
-
-
Method Details
-
getIv
public byte[] getIv() -
isIVComplete
public boolean isIVComplete() -
initializeCipher
- Throws:
IOException
-
write
- Overrides:
write
in classFilterOutputStream
- Throws:
IOException
-
write
- Overrides:
write
in classFilterOutputStream
- Throws:
IOException
-
write
- Overrides:
write
in classFilterOutputStream
- Throws:
IOException
-
setParentOutputStream
-