Interface PasswordBasedCipherFactory

  • All Superinterfaces:
    CipherSpecifications

    @Role
    public interface PasswordBasedCipherFactory
    extends CipherSpecifications
    Factory creating block ciphers for encryption and decryption that use a password to derive their keys (and initialization vector when that one is not provided).
    Since:
    5.4M1
    Version:
    $Id: 56622ccb558be08c5b66304ae406a3d1e072f2ab $
    • Method Detail

      • getInstance

        PasswordBasedCipher getInstance​(boolean forEncryption,
                                        SymmetricCipherParameters password,
                                        KeyDerivationFunctionParameters kdfParameters)
        Create a new initialized password based cipher from parameters.
        Parameters:
        forEncryption - if true the cipher is initialised for encryption, if false for decryption.
        password - cipher parameters, using a password converted to bytes for the key.
        kdfParameters - the parameters of the derivation function.
        Returns:
        an initialized cipher ready to process data.
      • getInstance

        PasswordBasedCipher getInstance​(boolean forEncryption,
                                        SymmetricCipherParameters password,
                                        KeyDerivationFunction function)
        Create a new initialized password based cipher using the given key derivation function.
        Parameters:
        forEncryption - if true the cipher is initialised for encryption, if false for decryption.
        password - cipher parameters, using a password converted to bytes for the key.
        function - the key derivation function to use for deriving key from password.
        Returns:
        an initialized cipher ready to process data.
      • getInstance

        PasswordBasedCipher getInstance​(boolean forEncryption,
                                        byte[] password,
                                        byte[] encoded)
        Create a new initialized password based cipher from serialized encoding.
        Parameters:
        forEncryption - if true the cipher is initialised for encryption, if false for decryption.
        password - the password used to derive the encryption key.
        encoded - encoded parameters to initialize the cipher and derivation function.
        Returns:
        an initialized cipher ready to process data.