Class JcePublicKeyKeyEncryptionMethodGenerator
- java.lang.Object
-
- org.bouncycastle.openpgp.operator.PGPKeyEncryptionMethodGenerator
-
- org.bouncycastle.openpgp.operator.PublicKeyKeyEncryptionMethodGenerator
-
- org.bouncycastle.openpgp.operator.jcajce.JcePublicKeyKeyEncryptionMethodGenerator
-
public class JcePublicKeyKeyEncryptionMethodGenerator extends PublicKeyKeyEncryptionMethodGenerator
-
-
Field Summary
-
Fields inherited from class org.bouncycastle.openpgp.operator.PublicKeyKeyEncryptionMethodGenerator
SESSION_KEY_OBFUSCATION_PROPERTY, sessionKeyObfuscation
-
-
Constructor Summary
Constructors Constructor Description JcePublicKeyKeyEncryptionMethodGenerator(PGPPublicKey key)
Create a public key encryption method generator with the method to be based on the passed in key.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected byte[]
encryptSessionInfo(PGPPublicKey pubKey, byte[] sessionInfo)
JcePublicKeyKeyEncryptionMethodGenerator
setProvider(java.lang.String providerName)
JcePublicKeyKeyEncryptionMethodGenerator
setProvider(java.security.Provider provider)
JcePublicKeyKeyEncryptionMethodGenerator
setSecureRandom(java.security.SecureRandom random)
Provide a user defined source of randomness.-
Methods inherited from class org.bouncycastle.openpgp.operator.PublicKeyKeyEncryptionMethodGenerator
generate, processSessionInfo, setSessionKeyObfuscation
-
-
-
-
Constructor Detail
-
JcePublicKeyKeyEncryptionMethodGenerator
public JcePublicKeyKeyEncryptionMethodGenerator(PGPPublicKey key)
Create a public key encryption method generator with the method to be based on the passed in key.- Parameters:
key
- the public key to use for encryption.
-
-
Method Detail
-
setProvider
public JcePublicKeyKeyEncryptionMethodGenerator setProvider(java.security.Provider provider)
-
setProvider
public JcePublicKeyKeyEncryptionMethodGenerator setProvider(java.lang.String providerName)
-
setSecureRandom
public JcePublicKeyKeyEncryptionMethodGenerator setSecureRandom(java.security.SecureRandom random)
Provide a user defined source of randomness.- Parameters:
random
- the secure random to be used.- Returns:
- the current generator.
-
encryptSessionInfo
protected byte[] encryptSessionInfo(PGPPublicKey pubKey, byte[] sessionInfo) throws PGPException
- Specified by:
encryptSessionInfo
in classPublicKeyKeyEncryptionMethodGenerator
- Throws:
PGPException
-
-