Package org.nuxeo.ecm.core.blob.binary
Class AESBinaryManager.CipherAndDigestOutputStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
org.nuxeo.ecm.core.blob.binary.AESBinaryManager.CipherAndDigestOutputStream
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
- Enclosing class:
- AESBinaryManager
A
CipherOutputStream
that also does a digest of the original stream at
the same time.-
Field Summary
Modifier and TypeFieldDescriptionprotected Cipher
protected byte[]
protected MessageDigest
protected OutputStream
-
Constructor Summary
ConstructorDescriptionCipherAndDigestOutputStream
(OutputStream out, Cipher cipher, MessageDigest messageDigest) -
Method Summary
Methods inherited from class java.io.FilterOutputStream
write
Methods inherited from class java.io.OutputStream
nullOutputStream
-
Field Details
-
cipher
-
out
-
messageDigest
-
digest
protected byte[] digest
-
-
Constructor Details
-
CipherAndDigestOutputStream
-
-
Method Details
-
getDigest
public byte[] getDigest() -
write
- Overrides:
write
in classFilterOutputStream
- Throws:
IOException
-
write
- Overrides:
write
in classFilterOutputStream
- Throws:
IOException
-
flush
- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classFilterOutputStream
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classFilterOutputStream
- Throws:
IOException
-