Class BcPublicKeyKeyEncryptionMethodGenerator
java.lang.Object
org.bouncycastle.openpgp.operator.PGPKeyEncryptionMethodGenerator
org.bouncycastle.openpgp.operator.PublicKeyKeyEncryptionMethodGenerator
org.bouncycastle.openpgp.operator.bc.BcPublicKeyKeyEncryptionMethodGenerator
A method generator for supporting public key based encryption operations.
-
Field Summary
Fields inherited from class org.bouncycastle.openpgp.operator.PublicKeyKeyEncryptionMethodGenerator
SESSION_KEY_OBFUSCATION_PROPERTY, sessionKeyObfuscation, useWildcardKeyID, WILDCARD
-
Constructor Summary
ConstructorDescriptionCreate a public key encryption method generator with the method to be based on the passed in key. -
Method Summary
Modifier and TypeMethodDescriptionprotected byte[]
encryptSessionInfo
(PGPPublicKey pubKey, byte[] sessionInfo) setSecureRandom
(SecureRandom random) Provide a user defined source of randomness.Methods inherited from class org.bouncycastle.openpgp.operator.PublicKeyKeyEncryptionMethodGenerator
generate, generateV5, generateV6, getSessionInfo, getSessionInfo, processSessionInfo, setSessionKeyObfuscation, setUseWildcardKeyID
-
Constructor Details
-
BcPublicKeyKeyEncryptionMethodGenerator
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 Details
-
setSecureRandom
Provide a user defined source of randomness.- Parameters:
random
- the secure random to be used.- Returns:
- the current generator.
-
encryptSessionInfo
- Specified by:
encryptSessionInfo
in classPublicKeyKeyEncryptionMethodGenerator
- Throws:
PGPException
-