Bouncy Castle Cryptography Library 1.81

org.bouncycastle.openpgp.operator
Interface PBESecretKeyEncryptorFactory

All Known Implementing Classes:
BcAEADSecretKeyEncryptorFactory, BcCFBSecretKeyEncryptorFactory, JcaAEADSecretKeyEncryptorFactory, JcaCFBSecretKeyEncryptorFactory

public interface PBESecretKeyEncryptorFactory

Factory class for password-based secret key encryptors. A concrete implementation of this class can not only choose the cryptographic backend (e.g. BC, JCA/JCE), but also, whether to use AEAD (RFC9580) or classic CFB (RFC4880).


Method Summary
 PBESecretKeyEncryptor build(char[] passphrase, PublicKeyPacket pubKeyPacket)
          Build a new PBESecretKeyEncryptor instance from the given passphrase and public key packet.
 

Method Detail

build

public PBESecretKeyEncryptor build(char[] passphrase,
                                   PublicKeyPacket pubKeyPacket)
Build a new PBESecretKeyEncryptor instance from the given passphrase and public key packet.

Parameters:
passphrase - passphrase
pubKeyPacket - public-key packet of the key to protect (needed for AEAD)
Returns:
key encryptor

Bouncy Castle Cryptography Library 1.81