Class ChaosEncryptionOutputStream

java.lang.Object
java.io.OutputStream
org.refcodes.security.EncryptionOutputStream
org.refcodes.security.alt.chaos.ChaosEncryptionOutputStream
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable, org.refcodes.mixin.Disposable

public class ChaosEncryptionOutputStream extends org.refcodes.security.EncryptionOutputStream
A ChaosEncryptionOutputStream wraps an OutputStream and produces output bytes by applying a ChaosEncrypter on each byte to be written before delegating the processed vale to the given OutputStream. The output of the ChaosEncryptionOutputStream can be converted back by the according ChaosDecryptionInputStream. In case salting is enabled, then the ChaosEncryptionOutputStream initially encrypts heading bytes of an OutputStream with a random salt ChaosKey which then is used as initially encrypting the plan data (being reversed using the ChaosDecryptionInputStream with salting enabled).