Top Description Methods
org.bouncycastle.openpgp.operator

public Interface PBESecretKeyEncryptorFactory

Known Direct Implementers
org.bouncycastle.openpgp.operator.bc.BcAEADSecretKeyEncryptorFactory, org.bouncycastle.openpgp.operator.bc.BcCFBSecretKeyEncryptorFactory, org.bouncycastle.openpgp.operator.jcajce.JcaAEADSecretKeyEncryptorFactory, org.bouncycastle.openpgp.operator.jcajce.JcaCFBSecretKeyEncryptorFactory
Imports
org.bouncycastle.bcpg.PublicKeyPacket

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

Modifier and TypeMethod and Description
public PBESecretKeyEncryptor

Returns:

key encryptor
build
(char[]
passphrase
passphrase
,
PublicKeyPacket
public-key packet of the key to protect (needed for AEAD)
pubKeyPacket
)

Build a new PBESecretKeyEncryptor instance from the given passphrase and public key packet.

Method Detail

buildback to summary
public PBESecretKeyEncryptor build(char[] passphrase, PublicKeyPacket pubKeyPacket)

Build a new PBESecretKeyEncryptor instance from the given passphrase and public key packet.

Parameters
passphrase:char[]

passphrase

pubKeyPacket:PublicKeyPacket

public-key packet of the key to protect (needed for AEAD)

Returns:PBESecretKeyEncryptor

key encryptor