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

public Class JcePublicKeyKeyEncryptionMethodGenerator

extends PublicKeyKeyEncryptionMethodGenerator
Class Inheritance
Imports
java.io.IOException, java.math.BigInteger, java.security.AlgorithmParameters, .GeneralSecurityException, .InvalidKeyException, .Key, .KeyPair, .KeyPairGenerator, .Provider, .PublicKey, .SecureRandom, java.security.spec.AlgorithmParameterSpec, javax.crypto.BadPaddingException, .Cipher, .IllegalBlockSizeException, .KeyAgreement, javax.crypto.spec.SecretKeySpec, org.bouncycastle.asn1.x509.SubjectPublicKeyInfo, org.bouncycastle.asn1.x9.X962Parameters, .X9ECParameters, org.bouncycastle.bcpg.ECDHPublicBCPGKey, .MPInteger, .PublicKeyAlgorithmTags, .PublicKeyPacket, org.bouncycastle.jcajce.spec.UserKeyingMaterialSpec, org.bouncycastle.jcajce.util.DefaultJcaJceHelper, .NamedJcaJceHelper, .ProviderJcaJceHelper, org.bouncycastle.openpgp.PGPException, .PGPPublicKey, .PGPUtil, org.bouncycastle.openpgp.operator.PGPPad, .PublicKeyKeyEncryptionMethodGenerator, .RFC6637Utils, org.bouncycastle.util.Arrays

Field Summary

Modifier and TypeField and Description
private OperatorHelper
private JcaPGPKeyConverter
private SecureRandom
private static final byte
Inherited from org.bouncycastle.openpgp.operator.PublicKeyKeyEncryptionMethodGenerator:
SESSION_KEY_OBFUSCATION_PROPERTYsessionKeyObfuscation

Constructor Summary

AccessConstructor and Description
public
JcePublicKeyKeyEncryptionMethodGenerator(PGPPublicKey
the public key to use for encryption.
key
)

Create a public key encryption method generator with the method to be based on the passed in key.

Method Summary

Modifier and TypeMethod and Description
protected byte[]
private byte[]
encryptSessionInfo(ECDHPublicBCPGKey ecKey, byte[] sessionInfo, Key secret, byte[] ephPubEncoding)

public JcePublicKeyKeyEncryptionMethodGenerator
public JcePublicKeyKeyEncryptionMethodGenerator
setProvider(String providerName)

public JcePublicKeyKeyEncryptionMethodGenerator

Returns:

the current generator.
setSecureRandom
(SecureRandom
the secure random to be used.
random
)

Provide a user defined source of randomness.

Inherited from org.bouncycastle.openpgp.operator.PublicKeyKeyEncryptionMethodGenerator:
generateprocessSessionInfosetSessionKeyObfuscation

Field Detail

helperback to summary
private OperatorHelper helper
keyConverterback to summary
private JcaPGPKeyConverter keyConverter
randomback to summary
private SecureRandom random
X_HDRback to summary
private static final byte X_HDR

Constructor Detail

JcePublicKeyKeyEncryptionMethodGeneratorback to summary
public JcePublicKeyKeyEncryptionMethodGenerator(PGPPublicKey key)

Create a public key encryption method generator with the method to be based on the passed in key.

Parameters
key:PGPPublicKey

the public key to use for encryption.

Method Detail

encryptSessionInfoback to summary
protected byte[] encryptSessionInfo(PGPPublicKey pubKey, byte[] sessionInfo) throws PGPException

Implements abstract org.bouncycastle.openpgp.operator.PublicKeyKeyEncryptionMethodGenerator.encryptSessionInfo.

encryptSessionInfoback to summary
private byte[] encryptSessionInfo(ECDHPublicBCPGKey ecKey, byte[] sessionInfo, Key secret, byte[] ephPubEncoding) throws GeneralSecurityException, IOException, PGPException
setProviderback to summary
public JcePublicKeyKeyEncryptionMethodGenerator setProvider(Provider provider)
setProviderback to summary
public JcePublicKeyKeyEncryptionMethodGenerator setProvider(String providerName)
setSecureRandomback to summary
public JcePublicKeyKeyEncryptionMethodGenerator setSecureRandom(SecureRandom random)

Provide a user defined source of randomness.

Parameters
random:SecureRandom

the secure random to be used.

Returns:JcePublicKeyKeyEncryptionMethodGenerator

the current generator.