Class BcAEADSecretKeyEncryptorFactory
- java.lang.Object
-
- org.bouncycastle.openpgp.operator.bc.BcAEADSecretKeyEncryptorFactory
-
- All Implemented Interfaces:
PBESecretKeyEncryptorFactory
public class BcAEADSecretKeyEncryptorFactory extends java.lang.Object implements PBESecretKeyEncryptorFactory
Return a factory forPBESecretKeyEncryptorinstances which protect the secret key material by deriving a key-encryption-key usingS2K.ARGON_2S2K and apply that key usingSecretKeyPacket.USAGE_AEAD.This particular factory uses OCB + AES256 for secret key protection and requires 64MiB of RAM for the Argon2 key derivation (see
S2K.Argon2Params.memoryConstrainedParameters()).
-
-
Constructor Summary
Constructors Constructor Description BcAEADSecretKeyEncryptorFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PBESecretKeyEncryptorbuild(char[] passphrase, PublicKeyPacket pubKeyPacket)Build a newPBESecretKeyEncryptorinstance from the given passphrase and public key packet.
-
-
-
Method Detail
-
build
public PBESecretKeyEncryptor build(char[] passphrase, PublicKeyPacket pubKeyPacket)
Description copied from interface:PBESecretKeyEncryptorFactoryBuild a newPBESecretKeyEncryptorinstance from the given passphrase and public key packet.- Specified by:
buildin interfacePBESecretKeyEncryptorFactory- Parameters:
passphrase- passphrasepubKeyPacket- public-key packet of the key to protect (needed for AEAD)- Returns:
- key encryptor
-
-