- java.lang.Object
-
- javax.crypto.CipherSpi
-
- org.refcodes.security.ext.chaos.ChaosCipherSpi
-
public class ChaosCipherSpi extends CipherSpi
Thanks Christian Pontesegger for the very good example on "Writing your own JCA extensions - a full cipher" at: "http://codeandme.blogspot.de/2013/07/writing-your-own-jca-extensions-full.html" and for the very good example on "Writing your own JCA extensions - a simple digest " at: "http://codeandme.blogspot.de/2013/06/writing-your-own-jca-extensions-simple.html"
-
-
Constructor Summary
Constructors Constructor Description ChaosCipherSpi()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected byte[]engineDoFinal(byte[] aInput, int aInputOffset, int aInputLength)protected intengineDoFinal(byte[] aInput, int aInputOffset, int aInputLength, byte[] output, int outputOffset)protected intengineGetBlockSize()protected byte[]engineGetIV()protected intengineGetKeySize(Key key)protected intengineGetOutputSize(int aInputLength)protected AlgorithmParametersengineGetParameters()protected voidengineInit(int opmode, Key key, AlgorithmParameters aParams, SecureRandom aRandom)protected voidengineInit(int aMode, Key aKey, SecureRandom aRandom)protected voidengineInit(int opmode, Key key, AlgorithmParameterSpec aParams, SecureRandom aRandom)protected voidengineSetMode(String aMode)protected voidengineSetPadding(String aPading)protected byte[]engineUpdate(byte[] aInput, int aInputOffset, int aInputLength)protected intengineUpdate(byte[] aInput, int aInputOffset, int aInputLength, byte[] aOutput, int aOutputOffset)-
Methods inherited from class javax.crypto.CipherSpi
engineDoFinal, engineUnwrap, engineUpdate, engineUpdateAAD, engineUpdateAAD, engineWrap
-
-
-
-
Method Detail
-
engineDoFinal
protected byte[] engineDoFinal(byte[] aInput, int aInputOffset, int aInputLength) throws IllegalBlockSizeException, BadPaddingException- Specified by:
engineDoFinalin classCipherSpi- Throws:
IllegalBlockSizeExceptionBadPaddingException
-
engineDoFinal
protected int engineDoFinal(byte[] aInput, int aInputOffset, int aInputLength, byte[] output, int outputOffset) throws ShortBufferException, IllegalBlockSizeException, BadPaddingException- Specified by:
engineDoFinalin classCipherSpi- Throws:
ShortBufferExceptionIllegalBlockSizeExceptionBadPaddingException
-
engineGetBlockSize
protected int engineGetBlockSize()
- Specified by:
engineGetBlockSizein classCipherSpi
-
engineGetIV
protected byte[] engineGetIV()
- Specified by:
engineGetIVin classCipherSpi
-
engineGetOutputSize
protected int engineGetOutputSize(int aInputLength)
- Specified by:
engineGetOutputSizein classCipherSpi
-
engineGetParameters
protected AlgorithmParameters engineGetParameters()
- Specified by:
engineGetParametersin classCipherSpi
-
engineInit
protected void engineInit(int aMode, Key aKey, SecureRandom aRandom) throws InvalidKeyException- Specified by:
engineInitin classCipherSpi- Throws:
InvalidKeyException
-
engineInit
protected void engineInit(int opmode, Key key, AlgorithmParameterSpec aParams, SecureRandom aRandom) throws InvalidKeyException, InvalidAlgorithmParameterException- Specified by:
engineInitin classCipherSpi- Throws:
InvalidKeyExceptionInvalidAlgorithmParameterException
-
engineInit
protected void engineInit(int opmode, Key key, AlgorithmParameters aParams, SecureRandom aRandom) throws InvalidKeyException, InvalidAlgorithmParameterException- Specified by:
engineInitin classCipherSpi- Throws:
InvalidKeyExceptionInvalidAlgorithmParameterException
-
engineSetMode
protected void engineSetMode(String aMode) throws NoSuchAlgorithmException
- Specified by:
engineSetModein classCipherSpi- Throws:
NoSuchAlgorithmException
-
engineSetPadding
protected void engineSetPadding(String aPading) throws NoSuchPaddingException
- Specified by:
engineSetPaddingin classCipherSpi- Throws:
NoSuchPaddingException
-
engineUpdate
protected byte[] engineUpdate(byte[] aInput, int aInputOffset, int aInputLength)- Specified by:
engineUpdatein classCipherSpi
-
engineUpdate
protected int engineUpdate(byte[] aInput, int aInputOffset, int aInputLength, byte[] aOutput, int aOutputOffset) throws ShortBufferException- Specified by:
engineUpdatein classCipherSpi- Throws:
ShortBufferException
-
engineGetKeySize
protected int engineGetKeySize(Key key) throws InvalidKeyException
- Overrides:
engineGetKeySizein classCipherSpi- Throws:
InvalidKeyException
-
-