Bouncy Castle Cryptography Library 1.81

org.bouncycastle.openpgp.operator.bc
Class BcCFBSecretKeyEncryptorFactory

java.lang.Object
  extended byorg.bouncycastle.openpgp.operator.bc.BcCFBSecretKeyEncryptorFactory
All Implemented Interfaces:
PBESecretKeyEncryptorFactory

public class BcCFBSecretKeyEncryptorFactory
extends java.lang.Object
implements PBESecretKeyEncryptorFactory

Return a factory for PBESecretKeyEncryptor instances which protect the secret key material by deriving a key-encryption-key using S2K.SALTED_AND_ITERATED S2K and apply that key using SecretKeyPacket.USAGE_SHA1 (CFB mode).

This particular factory derives a key-encryption-key via salted+iterated S2K derivation using SHA256 and uses AES256 for secret key protection.


Constructor Summary
BcCFBSecretKeyEncryptorFactory(int symmetricKeyAlgorithm, int iterationCount)
           
 
Method Summary
 PBESecretKeyEncryptor build(char[] passphrase, PublicKeyPacket pubKeyPacket)
          Build a new PBESecretKeyEncryptor instance from the given passphrase and public key packet.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BcCFBSecretKeyEncryptorFactory

public BcCFBSecretKeyEncryptorFactory(int symmetricKeyAlgorithm,
                                      int iterationCount)
Method Detail

build

public PBESecretKeyEncryptor build(char[] passphrase,
                                   PublicKeyPacket pubKeyPacket)
Description copied from interface: PBESecretKeyEncryptorFactory
Build a new PBESecretKeyEncryptor instance from the given passphrase and public key packet.

Specified by:
build in interface PBESecretKeyEncryptorFactory
Parameters:
passphrase - passphrase
pubKeyPacket - public-key packet of the key to protect (needed for AEAD)
Returns:
key encryptor

Bouncy Castle Cryptography Library 1.81