Class AbstractEncryptionHandler

    • Constructor Detail

      • AbstractEncryptionHandler

        public AbstractEncryptionHandler()
        Deprecated.
    • Method Detail

      • encrypt

        protected byte[] encrypt​(String algorithm,
                                 Key key,
                                 byte[] data)
        Deprecated.
        Encrypts the given plaintext using the specified key with the specified encryption algorithm.
        Parameters:
        algorithm - The Java Cryptographic encryption algorithm.
        key - The encryption key.
        data - The data to encrypt.
        Returns:
        An array of bytes representing the encrypted data.
      • encrypt

        protected byte[] encrypt​(String algorithm,
                                 Key key,
                                 byte[] initialisationVector,
                                 byte[] data)
        Deprecated.
        Encrypts the given plaintext using the specified key and initialisation vector with the specified encryption algorithm.
        Parameters:
        algorithm - The Java Cryptographic encryption algorithm.
        key - The encryption key.
        initialisationVector - The initialisation vector.
        data - The data to encrypt.
        Returns:
        An array of bytes representing the encrypted data.
      • decrypt

        public byte[] decrypt​(String algorithm,
                              Key privateKey,
                              byte[] data)
        Deprecated.
        Decrypts the given ciphertext using the private key and with the same encryption algorithm that was used in the encryption.
        Parameters:
        algorithm - The Java Cryptographic encryption algorithm.
        privateKey - The private key pair to the public key used in the encryption.
        data - The ciphertext to decrypt.
        Returns:
        An array of bytes representing the decrypted data.
      • decrypt

        protected byte[] decrypt​(String algorithm,
                                 Key key,
                                 byte[] initialisationVector,
                                 byte[] data)
        Deprecated.
        Decrypts the given ciphertext using the private key and initialisation vector with the same encryption algorithm that was used in the encryption.
        Parameters:
        algorithm - The Java Cryptographic encryption algorithm.
        key - The private key pair to the public key used in the encryption.
        initialisationVector - The same initialisation vector that was used in the encryption.
        data - The ciphertext to decrypt.
        Returns:
        An array of bytes representing the decrypted data.