Class AESCipherCBCnoPad


  • public class AESCipherCBCnoPad
    extends java.lang.Object
    Creates an AES Cipher with CBC and no padding.
    • Constructor Summary

      Constructors 
      Constructor Description
      AESCipherCBCnoPad​(boolean forEncryption, byte[] key)
      Creates a new instance of AESCipher with CBC and no padding
      AESCipherCBCnoPad​(boolean forEncryption, byte[] key, byte[] initVector)
      Creates a new instance of AESCipher with CBC and no padding
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      byte[] processBlock​(byte[] inp, int inpOff, int inpLen)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • CIPHER_WITHOUT_PADDING

        private static final java.lang.String CIPHER_WITHOUT_PADDING
        See Also:
        Constant Field Values
      • cipher

        private final javax.crypto.Cipher cipher
    • Constructor Detail

      • AESCipherCBCnoPad

        public AESCipherCBCnoPad​(boolean forEncryption,
                                 byte[] key)
        Creates a new instance of AESCipher with CBC and no padding
        Parameters:
        forEncryption - if true the cipher is initialised for encryption, if false for decryption
        key - the key to be used in the cipher
      • AESCipherCBCnoPad

        public AESCipherCBCnoPad​(boolean forEncryption,
                                 byte[] key,
                                 byte[] initVector)
        Creates a new instance of AESCipher with CBC and no padding
        Parameters:
        forEncryption - if true the cipher is initialised for encryption, if false for decryption
        key - the key to be used in the cipher
        initVector - initialization vector to be used in cipher
    • Method Detail

      • processBlock

        public byte[] processBlock​(byte[] inp,
                                   int inpOff,
                                   int inpLen)