Top Inners Fields Constructors Methods
org.bouncycastle.openpgp.operator.jcajce

public Class JceSessionKeyDataDecryptorFactoryBuilder

extends Object
Class Inheritance
Imports
java.security.Provider, org.bouncycastle.bcpg.AEADEncDataPacket, .SymmetricEncIntegrityPacket, org.bouncycastle.jcajce.util.DefaultJcaJceHelper, .NamedJcaJceHelper, .ProviderJcaJceHelper, org.bouncycastle.openpgp.PGPException, .PGPSessionKey, org.bouncycastle.openpgp.operator.PGPDataDecryptor, .SessionKeyDataDecryptorFactory

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private OperatorHelper
private JcaPGPKeyConverter

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public SessionKeyDataDecryptorFactory
build(PGPSessionKey sessionKey)

public JceSessionKeyDataDecryptorFactoryBuilder

Returns:

the current builder.
setProvider
(Provider
provider object for cryptographic primitives.
provider
)

Set the provider object to use for creating cryptographic primitives in the resulting factory the builder produces.

public JceSessionKeyDataDecryptorFactoryBuilder

Returns:

the current builder.
setProvider
(String
the name of the provider to reference for cryptographic primitives.
providerName
)

Set the provider name to use for creating cryptographic primitives in the resulting factory the builder produces.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

helperback to summary
private OperatorHelper helper
keyConverterback to summary
private JcaPGPKeyConverter keyConverter

Constructor Detail

JceSessionKeyDataDecryptorFactoryBuilderback to summary
public JceSessionKeyDataDecryptorFactoryBuilder()

Method Detail

buildback to summary
public SessionKeyDataDecryptorFactory build(PGPSessionKey sessionKey)
setProviderback to summary
public JceSessionKeyDataDecryptorFactoryBuilder setProvider(Provider provider)

Set the provider object to use for creating cryptographic primitives in the resulting factory the builder produces.

Parameters
provider:Provider

provider object for cryptographic primitives.

Returns:JceSessionKeyDataDecryptorFactoryBuilder

the current builder.

setProviderback to summary
public JceSessionKeyDataDecryptorFactoryBuilder setProvider(String providerName)

Set the provider name to use for creating cryptographic primitives in the resulting factory the builder produces.

Parameters
providerName:String

the name of the provider to reference for cryptographic primitives.

Returns:JceSessionKeyDataDecryptorFactoryBuilder

the current builder.

org.bouncycastle.openpgp.operator.jcajce back to summary

private Class JceSessionKeyDataDecryptorFactoryBuilder.JceSessionKeyDataDecryptorFactory

extends Object
implements SessionKeyDataDecryptorFactory
Class Inheritance
  • java.lang.Object
  • org.bouncycastle.openpgp.operator.jcajce.JceSessionKeyDataDecryptorFactoryBuilder.JceSessionKeyDataDecryptorFactory
All Implemented Interfaces
org.bouncycastle.openpgp.operator.SessionKeyDataDecryptorFactory, org.bouncycastle.openpgp.operator.PGPDataDecryptorFactory

Field Summary

Modifier and TypeField and Description
private final JceAEADUtil
private final OperatorHelper
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

aeadHelperback to summary
private final JceAEADUtil aeadHelper
helperback to summary
private final OperatorHelper helper
sessionKeyback to summary
private final PGPSessionKey sessionKey

Constructor Detail

JceSessionKeyDataDecryptorFactoryback to summary
public JceSessionKeyDataDecryptorFactory(OperatorHelper helper, 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