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).
build
public PBESecretKeyEncryptor build(char[] passphrase,
PublicKeyPacket pubKeyPacket)
- Build a new
PBESecretKeyEncryptor
instance from the given passphrase and public key packet.
- Parameters:
passphrase
- passphrasepubKeyPacket
- public-key packet of the key to protect (needed for AEAD)
- Returns:
- key encryptor