Package org.nuxeo.ecm.core.blob
Class AESBlobStore.EncryptingOutputStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
org.nuxeo.ecm.core.blob.AESBlobStore.EncryptingOutputStream
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
- Enclosing class:
- AESBlobStore
Output stream that encrypts while writing.
Stream format version 1 (values are in network order):
- 10 bytes: magic number "NUXEOCRYPT"
- 1 byte: file format version = 1
- 1 byte: use keystore = 1, use PBKDF2 = 2
- if use PBKDF2:
- 4 bytes: salt length = n
- n bytes: salt data
- 4 bytes: IV length = p
- p bytes: IV data
- x bytes: encrypted stream
- See Also:
-
Field Summary
Fields inherited from class java.io.FilterOutputStream
out
-
Constructor Summary
ConstructorDescriptionEncryptingOutputStream
(OutputStream out, AESBlobStoreConfiguration aesConfig) -
Method Summary
Methods inherited from class java.io.FilterOutputStream
close, flush, write, write
Methods inherited from class java.io.OutputStream
nullOutputStream
-
Field Details
-
aesConfig
-
-
Constructor Details
-
EncryptingOutputStream
public EncryptingOutputStream(OutputStream out, AESBlobStoreConfiguration aesConfig) throws IOException - Throws:
IOException
-
-
Method Details
-
writeHeader
- Throws:
IOException
-
write
- Overrides:
write
in classFilterOutputStream
- Throws:
IOException
-