Bouncy Castle Cryptography Library 1.49

org.bouncycastle.openpgp.operator.bc
Class BcPublicKeyKeyEncryptionMethodGenerator

java.lang.Object
  extended by org.bouncycastle.openpgp.operator.PGPKeyEncryptionMethodGenerator
      extended by org.bouncycastle.openpgp.operator.PublicKeyKeyEncryptionMethodGenerator
          extended by org.bouncycastle.openpgp.operator.bc.BcPublicKeyKeyEncryptionMethodGenerator

public class BcPublicKeyKeyEncryptionMethodGenerator
extends PublicKeyKeyEncryptionMethodGenerator

A method generator for supporting public key based encryption operations.


Constructor Summary
BcPublicKeyKeyEncryptionMethodGenerator(PGPPublicKey key)
          Create a public key encryption method generator with the method to be based on the passed in key.
 
Method Summary
protected  byte[] encryptSessionInfo(PGPPublicKey pubKey, byte[] sessionInfo)
           
 BcPublicKeyKeyEncryptionMethodGenerator setSecureRandom(java.security.SecureRandom random)
          Provide a user defined source of randomness.
 
Methods inherited from class org.bouncycastle.openpgp.operator.PublicKeyKeyEncryptionMethodGenerator
generate, processSessionInfo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BcPublicKeyKeyEncryptionMethodGenerator

public BcPublicKeyKeyEncryptionMethodGenerator(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

setSecureRandom

public BcPublicKeyKeyEncryptionMethodGenerator 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 class PublicKeyKeyEncryptionMethodGenerator
Throws:
PGPException

Bouncy Castle Cryptography Library 1.49