Class CipherNone

    • Constructor Detail

      • CipherNone

        public CipherNone()
    • Method Detail

      • getKeySize

        public int getKeySize()
        Specified by:
        getKeySize in interface KeySizeIndicator
        Returns:
        The number of bits used in the key
      • getIVSize

        public int getIVSize()
        Specified by:
        getIVSize in interface CipherInformation
        Returns:
        Size of the initialization vector (in bytes)
      • getKdfSize

        public int getKdfSize()
        Specified by:
        getKdfSize in interface CipherInformation
        Returns:
        The block size (in bytes) used to derive the secret key for this cipher
      • getCipherBlockSize

        public int getCipherBlockSize()
        Specified by:
        getCipherBlockSize in interface CipherInformation
        Returns:
        Size of block data used by the cipher (in bytes). For stream ciphers this value is (currently) used to indicate some average work buffer size to be used for the automatic re-keying mechanism described in RFC 4253 - Section 9
      • init

        public void init​(Cipher.Mode mode,
                         byte[] key,
                         byte[] iv)
                  throws Exception
        Description copied from interface: Cipher
        Initialize the cipher for encryption or decryption with the given key and initialization vector
        Specified by:
        init in interface Cipher
        Parameters:
        mode - Encrypt/Decrypt initialization
        key - Key bytes
        iv - Initialization vector bytes
        Throws:
        Exception - If failed to initialize
      • update

        public void update​(byte[] input,
                           int inputOffset,
                           int inputLen)
                    throws Exception
        Description copied from interface: Cipher
        Performs in-place encryption or decryption on the given data.
        Specified by:
        update in interface Cipher
        Parameters:
        input - The input/output bytes
        inputOffset - The offset of the data in the data buffer
        inputLen - The number of bytes to update - starting at the given offset
        Throws:
        Exception - If failed to execute