Bouncy Castle Cryptography Library 1.47

org.bouncycastle.openpgp.operator
Class PBEKeyEncryptionMethodGenerator

java.lang.Object
  extended by org.bouncycastle.openpgp.operator.PGPKeyEncryptionMethodGenerator
      extended by org.bouncycastle.openpgp.operator.PBEKeyEncryptionMethodGenerator
Direct Known Subclasses:
BcPBEKeyEncryptionMethodGenerator, JcePBEKeyEncryptionMethodGenerator

public abstract class PBEKeyEncryptionMethodGenerator
extends PGPKeyEncryptionMethodGenerator


Constructor Summary
protected PBEKeyEncryptionMethodGenerator(char[] passPhrase, PGPDigestCalculator s2kDigestCalculator)
           
 
Method Summary
protected abstract  byte[] encryptSessionInfo(int encAlgorithm, byte[] key, byte[] sessionInfo)
           
 ContainedPacket generate(int encAlgorithm, byte[] sessionInfo)
           
 byte[] getKey(int encAlgorithm)
           
 PBEKeyEncryptionMethodGenerator setSecureRandom(java.security.SecureRandom random)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PBEKeyEncryptionMethodGenerator

protected PBEKeyEncryptionMethodGenerator(char[] passPhrase,
                                          PGPDigestCalculator s2kDigestCalculator)
Method Detail

setSecureRandom

public PBEKeyEncryptionMethodGenerator setSecureRandom(java.security.SecureRandom random)

getKey

public byte[] getKey(int encAlgorithm)
              throws PGPException
Throws:
PGPException

generate

public ContainedPacket generate(int encAlgorithm,
                                byte[] sessionInfo)
                         throws PGPException
Specified by:
generate in class PGPKeyEncryptionMethodGenerator
Throws:
PGPException

encryptSessionInfo

protected abstract byte[] encryptSessionInfo(int encAlgorithm,
                                             byte[] key,
                                             byte[] sessionInfo)
                                      throws PGPException
Throws:
PGPException

Bouncy Castle Cryptography Library 1.47