Package org.refcodes.security.alt.chaos
Class ChaosDecryptionInputStream
java.lang.Object
java.io.InputStream
org.refcodes.security.DecryptionInputStream
org.refcodes.security.alt.chaos.ChaosDecryptionInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable,org.refcodes.mixin.Disposable
public class ChaosDecryptionInputStream
extends org.refcodes.security.DecryptionInputStream
A
ChaosDecryptionInputStream wraps an InputStream and
consumes input bytes by applying a ChaosDecrypter on each byte read
from the provided InputStream before passing back the processed byte
to the caller. The input of the ChaosDecryptionInputStream can be
converted back by the according ChaosEncryptionOutputStream.
In case salting is enabled in the root ChaosKey, then the
ChaosDecryptionInputStream initially decrypts heading bytes of an
InputStream which then are used as a salt ChaosKey finally
decrypting the decrypted "salted" data (being created using the
ChaosEncryptionOutputStream with salting enabled).-
Constructor Summary
ConstructorsConstructorDescriptionChaosDecryptionInputStream(InputStream aInputStream, ChaosKey aKey) Constructs theChaosDecryptionInputStreamusing the givenChaosKeyfor decrypting. -
Method Summary
Methods inherited from class org.refcodes.security.DecryptionInputStream
available, close, dispose, equals, hashCode, mark, markSupported, read, read, read, reset, skip, toStringMethods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Constructor Details
-
ChaosDecryptionInputStream
Constructs theChaosDecryptionInputStreamusing the givenChaosKeyfor decrypting.- Parameters:
aInputStream- TheInputStreamto be wrapped.aKey- TheChaosKeyto use for decrypting.*- Throws:
IOException- Signals that an I/O exception has occurred while applying salting.
-