Interface Cipher

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static class  Cipher.Mode  
    • Method Summary

      Modifier and Type Method Description
      int getBlockSize()  
      int getIVSize()  
      void init​(Cipher.Mode mode, byte[] key, byte[] iv)
      Initialize the cipher for encryption or decryption with the given private key and initialization vector
      void update​(byte[] input, int inputOffset, int inputLen)
      Performs in-place encryption or decryption on the given data.
    • Method Detail

      • getBlockSize

        int getBlockSize()
        Returns:
        the block size for this cipher
      • getIVSize

        int getIVSize()
        Returns:
        the size of the initialization vector
      • init

        void init​(Cipher.Mode mode,
                  byte[] key,
                  byte[] iv)
        Initialize the cipher for encryption or decryption with the given private key and initialization vector
        Parameters:
        mode - whether this instance wil encrypt or decrypt
        key - the key for the cipher
        iv - initialization vector
      • update

        void update​(byte[] input,
                    int inputOffset,
                    int inputLen)
        Performs in-place encryption or decryption on the given data.
        Parameters:
        input - the subject
        inputOffset - offset at which to start
        inputLen - number of bytes starting at inputOffset