Top Description Fields Constructors Methods
org.bouncycastle.openpgp.operator.bc

public Class BcSessionKeyDataDecryptorFactory

extends Object
implements SessionKeyDataDecryptorFactory
Class Inheritance
All Implemented Interfaces
org.bouncycastle.openpgp.operator.SessionKeyDataDecryptorFactory, org.bouncycastle.openpgp.operator.PGPDataDecryptorFactory
Imports
org.bouncycastle.bcpg.AEADEncDataPacket, .SymmetricEncIntegrityPacket, org.bouncycastle.crypto.BlockCipher, org.bouncycastle.openpgp.PGPException, .PGPSessionKey, org.bouncycastle.openpgp.operator.PGPDataDecryptor, .SessionKeyDataDecryptorFactory

A decryptor factory for handling PGP session keys.

Field Summary

Modifier and TypeField and Description
private final PGPSessionKey

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public PGPDataDecryptor
createDataDecryptor(boolean
true if the packet to be decrypted has integrity checking enabled.
withIntegrityPacket
,
int
the identifier of the encryption algorithm to decrypt with.
encAlgorithm
,
byte[]
the bytes of the key for the cipher.
key
)

Implements org.bouncycastle.openpgp.operator.PGPDataDecryptorFactory.createDataDecryptor.

Constructs a data decryptor for SED or v1 SEIPD packets.

public PGPDataDecryptor
createDataDecryptor(AEADEncDataPacket
AEAD encrypted data packet
aeadEncDataPacket
,
PGPSessionKey
decrypted session key
sessionKey
)

Implements org.bouncycastle.openpgp.operator.PGPDataDecryptorFactory.createDataDecryptor.

Constructs a data decryptor for AEAD Encrypted Data packets.

public PGPDataDecryptor
createDataDecryptor(SymmetricEncIntegrityPacket
version 2 symmetrically encrypted integrity-protected data packet using AEAD.
seipd
,
PGPSessionKey
decrypted session key
sessionKey
)

Implements org.bouncycastle.openpgp.operator.PGPDataDecryptorFactory.createDataDecryptor.

Constructs a data decryptor for v2 SEIPD packets.

public PGPSessionKey
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

sessionKeyback to summary
private final PGPSessionKey sessionKey

Constructor Detail

BcSessionKeyDataDecryptorFactoryback to summary
public BcSessionKeyDataDecryptorFactory(PGPSessionKey sessionKey)

Method Detail

createDataDecryptorback to summary
public PGPDataDecryptor createDataDecryptor(boolean withIntegrityPacket, int encAlgorithm, byte[] key) throws PGPException

Implements org.bouncycastle.openpgp.operator.PGPDataDecryptorFactory.createDataDecryptor.

Doc from org.bouncycastle.openpgp.operator.PGPDataDecryptorFactory.createDataDecryptor.

Constructs a data decryptor for SED or v1 SEIPD packets.

Parameters
withIntegrityPacket:boolean

true if the packet to be decrypted has integrity checking enabled.

encAlgorithm:int

the identifier of the encryption algorithm to decrypt with.

key:byte[]

the bytes of the key for the cipher.

Returns:PGPDataDecryptor

a data decryptor that can decrypt (and verify) streams of encrypted data.

Annotations
@Override
Exceptions
PGPException:
if an error occurs initialising the decryption and integrity checking functions.
createDataDecryptorback to summary
public PGPDataDecryptor createDataDecryptor(AEADEncDataPacket aeadEncDataPacket, PGPSessionKey sessionKey) throws PGPException

Implements org.bouncycastle.openpgp.operator.PGPDataDecryptorFactory.createDataDecryptor.

Doc from org.bouncycastle.openpgp.operator.PGPDataDecryptorFactory.createDataDecryptor.

Constructs a data decryptor for AEAD Encrypted Data packets. This method is used with OpenPGP v5 AEAD.

Parameters
aeadEncDataPacket:AEADEncDataPacket

AEAD encrypted data packet

sessionKey:PGPSessionKey

decrypted session key

Returns:PGPDataDecryptor

a data decryptor that can decrypt (and verify) streams of encrypted data.

Annotations
@Override
Exceptions
PGPException:
if an error occurs initialising the decryption and integrity checking functions.
createDataDecryptorback to summary
public PGPDataDecryptor createDataDecryptor(SymmetricEncIntegrityPacket seipd, PGPSessionKey sessionKey) throws PGPException

Implements org.bouncycastle.openpgp.operator.PGPDataDecryptorFactory.createDataDecryptor.

Doc from org.bouncycastle.openpgp.operator.PGPDataDecryptorFactory.createDataDecryptor.

Constructs a data decryptor for v2 SEIPD packets. This method is used with OpenPGP v6 AEAD.

Parameters
seipd:SymmetricEncIntegrityPacket

version 2 symmetrically encrypted integrity-protected data packet using AEAD.

sessionKey:PGPSessionKey

decrypted session key

Returns:PGPDataDecryptor

a data decryptor that can decrypt (and verify) streams of encrypted data.

Annotations
@Override
Exceptions
PGPException:
if an error occurs initialising the decryption and integrity checking functions.
getSessionKeyback to summary
public PGPSessionKey getSessionKey()

Implements org.bouncycastle.openpgp.operator.SessionKeyDataDecryptorFactory.getSessionKey.

Annotations
@Override