public class BcAEADSecretKeyEncryptorBuilder extends java.lang.Object implements AEADSecretKeyEncryptorBuilder
| Constructor and Description |
|---|
BcAEADSecretKeyEncryptorBuilder(int aeadAlgorithm,
int symmetricAlgorithm,
S2K.Argon2Params argon2Params) |
| Modifier and Type | Method and Description |
|---|---|
PBESecretKeyEncryptor |
build(char[] passphrase,
PublicKeyPacket pubKey)
Build a new
PBESecretKeyEncryptor using the given passphrase. |
BcAEADSecretKeyEncryptorBuilder |
setSecureRandom(java.security.SecureRandom random) |
public BcAEADSecretKeyEncryptorBuilder(int aeadAlgorithm,
int symmetricAlgorithm,
S2K.Argon2Params argon2Params)
public BcAEADSecretKeyEncryptorBuilder setSecureRandom(java.security.SecureRandom random)
public PBESecretKeyEncryptor build(char[] passphrase, PublicKeyPacket pubKey)
AEADSecretKeyEncryptorBuilderPBESecretKeyEncryptor using the given passphrase.
Note: As the AEAD protection mechanism includes the public key packet of the key into the calculation,
if the key you want to protect is supposed to be a subkey, you need to convert it to one before
calling this method. See PGPKeyPair.asSubkey(KeyFingerPrintCalculator).build in interface AEADSecretKeyEncryptorBuilderpassphrase - passphrasepubKey - public primary or subkey packet