Class JcaAEADSecretKeyEncryptorBuilder
java.lang.Object
org.bouncycastle.openpgp.operator.jcajce.JcaAEADSecretKeyEncryptorBuilder
- All Implemented Interfaces:
AEADSecretKeyEncryptorBuilder
public class JcaAEADSecretKeyEncryptorBuilder
extends Object
implements AEADSecretKeyEncryptorBuilder
-
Constructor Summary
ConstructorsConstructorDescriptionJcaAEADSecretKeyEncryptorBuilder
(int aeadAlgorithm, int symmetricAlgorithm, S2K.Argon2Params argon2Params) -
Method Summary
Modifier and TypeMethodDescriptionbuild
(char[] passphrase, PublicKeyPacket pubKey) Build a newPBESecretKeyEncryptor
using the given passphrase.setProvider
(String providerName) setProvider
(Provider provider)
-
Constructor Details
-
JcaAEADSecretKeyEncryptorBuilder
public JcaAEADSecretKeyEncryptorBuilder(int aeadAlgorithm, int symmetricAlgorithm, S2K.Argon2Params argon2Params)
-
-
Method Details
-
setProvider
-
setProvider
-
build
Description copied from interface:AEADSecretKeyEncryptorBuilder
Build a newPBESecretKeyEncryptor
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. SeePGPKeyPair.asSubkey(KeyFingerPrintCalculator)
.- Specified by:
build
in interfaceAEADSecretKeyEncryptorBuilder
- Parameters:
passphrase
- passphrasepubKey
- public primary or subkey packet- Returns:
- encryptor using AEAD
-