Class DecryptingInputStream

java.lang.Object
java.io.InputStream
org.alfresco.encryption.DecryptingInputStream
All Implemented Interfaces:
Closeable, AutoCloseable

public class DecryptingInputStream extends InputStream
An input stream that encrypts data produced by a EncryptingOutputStream. A lightweight yet secure hybrid encryption scheme is used. A random symmetric key is decrypted using the receiver's private key. The supplied data is then decrypted using the symmetric key and read on a streaming basis. When the end of the stream is reached or the stream is closed, a HMAC checksum of the entire stream contents is validated.