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
ConstructorsConstructorDescriptionChaosTextEncrypter(ChaosKey aKey) Instantiates a newChaosTextEncrypterusing the givenChaosKeyfor encrypting.ChaosTextEncrypter(ChaosKey aKey, boolean isVerify) Instantiates a newChaosTextEncrypterusing the givenChaosKeyfor encrypting. -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()inttoEncrypted(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, waitMethods inherited from interface org.refcodes.security.Encrypter
encrypt, encrypt
-
Constructor Details
-
ChaosTextEncrypter
Instantiates a newChaosTextEncrypterusing the givenChaosKeyfor encrypting.- Parameters:
aKey- TheChaosKeyto use for encrypting.
-
ChaosTextEncrypter
Instantiates a newChaosTextEncrypterusing the givenChaosKeyfor encrypting.- Parameters:
aKey- TheChaosKeyto use for encrypting.isVerify- When true then the encryption is verified against an according live decryption to throw anIllegalStateExceptionin 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:
disposein interfaceorg.refcodes.mixin.Disposable
-