Bouncy Castle Cryptography Library 1.47

org.bouncycastle.openpgp.operator
Class PBESecretKeyEncryptor

java.lang.Object
  extended by org.bouncycastle.openpgp.operator.PBESecretKeyEncryptor

public abstract class PBESecretKeyEncryptor
extends java.lang.Object


Field Summary
protected  int encAlgorithm
           
protected  char[] passPhrase
           
protected  java.security.SecureRandom random
           
protected  S2K s2k
           
protected  PGPDigestCalculator s2kDigestCalculator
           
 
Constructor Summary
protected PBESecretKeyEncryptor(int encAlgorithm, PGPDigestCalculator s2kDigestCalculator, java.security.SecureRandom random, char[] passPhrase)
           
 
Method Summary
abstract  byte[] encryptKeyData(byte[] key, byte[] keyData, int keyOff, int keyLen)
           
 byte[] encryptKeyData(byte[] keyData, int keyOff, int keyLen)
           
 int getAlgorithm()
           
abstract  byte[] getCipherIV()
           
 byte[] getKey()
           
 S2K getS2K()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

encAlgorithm

protected int encAlgorithm

passPhrase

protected char[] passPhrase

s2kDigestCalculator

protected PGPDigestCalculator s2kDigestCalculator

s2k

protected S2K s2k

random

protected java.security.SecureRandom random
Constructor Detail

PBESecretKeyEncryptor

protected PBESecretKeyEncryptor(int encAlgorithm,
                                PGPDigestCalculator s2kDigestCalculator,
                                java.security.SecureRandom random,
                                char[] passPhrase)
Method Detail

getAlgorithm

public int getAlgorithm()

getKey

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

getS2K

public S2K getS2K()

encryptKeyData

public byte[] encryptKeyData(byte[] keyData,
                             int keyOff,
                             int keyLen)
                      throws PGPException
Throws:
PGPException

encryptKeyData

public abstract byte[] encryptKeyData(byte[] key,
                                      byte[] keyData,
                                      int keyOff,
                                      int keyLen)
                               throws PGPException
Throws:
PGPException

getCipherIV

public abstract byte[] getCipherIV()

Bouncy Castle Cryptography Library 1.47