public class BcPBEDataDecryptorFactory extends PBEDataDecryptorFactory
PBEDataDecryptorFactory for handling PBE decryption operations using the Bouncy Castle
lightweight API to implement cryptographic primitives.| Constructor and Description |
|---|
BcPBEDataDecryptorFactory(char[] pass,
BcPGPDigestCalculatorProvider calculatorProvider)
Base constructor.
|
| Modifier and Type | Method and Description |
|---|---|
PGPDataDecryptor |
createDataDecryptor(boolean withIntegrityPacket,
int encAlgorithm,
byte[] key)
Constructs a data decryptor.
|
byte[] |
recoverSessionData(int keyAlgorithm,
byte[] key,
byte[] secKeyData)
Decrypts session data from an encrypted data packet.
|
makeKeyFromPassPhrasepublic BcPBEDataDecryptorFactory(char[] pass,
BcPGPDigestCalculatorProvider calculatorProvider)
pass - the passphrase to use as the primary source of key material.calculatorProvider - a digest calculator provider to provide calculators to support the key generation calculation required.public byte[] recoverSessionData(int keyAlgorithm,
byte[] key,
byte[] secKeyData)
throws PGPException
PBEDataDecryptorFactoryrecoverSessionData in class PBEDataDecryptorFactorykeyAlgorithm - the encryption algorithm used to
encrypt the session data.key - the key bytes for the encryption algorithm.secKeyData - the encrypted session data to decrypt.PGPException - if an error occurs decrypting the session data.public PGPDataDecryptor createDataDecryptor(boolean withIntegrityPacket, int encAlgorithm, byte[] key) throws PGPException
PGPDataDecryptorFactorywithIntegrityPacket - true if the packet to be decrypted has integrity
checking enabled.encAlgorithm - the identifier of the encryption
algorithm to decrypt with.key - the bytes of the key for the cipher.PGPException - if an error occurs initialising the decryption and integrity checking
functions.