Package org.refcodes.security.alt.chaos
Class ChaosTextEncrypter
java.lang.Object
org.refcodes.security.alt.chaos.ChaosTextEncrypter
- All Implemented Interfaces:
org.refcodes.mixin.Disposable
,org.refcodes.security.Encrypter<String,
String, org.refcodes.security.EncryptionException>
public class ChaosTextEncrypter
extends Object
implements org.refcodes.security.Encrypter<String,String,org.refcodes.security.EncryptionException>
The
ChaosTextEncrypter
will use String
as input and output
type.-
Constructor Summary
ConstructorDescriptionChaosTextEncrypter
(ChaosKey aKey) Instantiates a newChaosTextEncrypter
using the givenChaosKey
for encrypting.ChaosTextEncrypter
(ChaosKey aKey, boolean isVerify) Instantiates a newChaosTextEncrypter
using the givenChaosKey
for encrypting. -
Method Summary
Modifier and TypeMethodDescriptionvoid
dispose()
int
toEncrypted
(byte[] aInput, int aInputOffset, int aInputLength, byte[] aOutput, int aOutputOffset) toEncrypted
(String aDecrypted) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.refcodes.security.Encrypter
encrypt, encrypt
-
Constructor Details
-
ChaosTextEncrypter
Instantiates a newChaosTextEncrypter
using the givenChaosKey
for encrypting.- Parameters:
aKey
- TheChaosKey
to use for encrypting.
-
ChaosTextEncrypter
Instantiates a newChaosTextEncrypter
using the givenChaosKey
for encrypting.- Parameters:
aKey
- TheChaosKey
to use for encrypting.isVerify
- When true then the encryption is verified against an according live decryption to throw anIllegalStateException
in case encryption and decryption differ.
-
-
Method Details
-
toEncrypted
-
toEncrypted
public int toEncrypted(byte[] aInput, int aInputOffset, int aInputLength, byte[] aOutput, int aOutputOffset) throws org.refcodes.security.EncryptionException -
dispose
public void dispose()- Specified by:
dispose
in interfaceorg.refcodes.mixin.Disposable
-