Bouncy Castle Cryptography Library 1.84

org.bouncycastle.openpgp.operator
Class GnuDivertToCardSecretKeyEncryptor

java.lang.Object
  extended byorg.bouncycastle.openpgp.operator.PBESecretKeyEncryptor
      extended byorg.bouncycastle.openpgp.operator.GnuDivertToCardSecretKeyEncryptor

public class GnuDivertToCardSecretKeyEncryptor
extends PBESecretKeyEncryptor

Secret key encryptor that allows to represent a secret key embedded on a smartcard, using GNU S2K extensions.

This extension is documented on GnuPG documentation DETAILS file, section "GNU extensions to the S2K algorithm".


Field Summary
 
Fields inherited from class org.bouncycastle.openpgp.operator.PBESecretKeyEncryptor
aeadAlgorithm, encAlgorithm, passPhrase, random, s2k, s2kCount, s2kDigestCalculator
 
Constructor Summary
GnuDivertToCardSecretKeyEncryptor(PGPDigestCalculator s2kDigestCalculator, byte[] serial)
           
 
Method Summary
 byte[] encryptKeyData(byte[] key, byte[] keyData, int keyOff, int keyLen)
           
 byte[] getCipherIV()
           
 byte[] getKey()
           
 
Methods inherited from class org.bouncycastle.openpgp.operator.PBESecretKeyEncryptor
encryptKeyData, encryptKeyData, getAeadAlgorithm, getAlgorithm, getHashAlgorithm, getS2K
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GnuDivertToCardSecretKeyEncryptor

public GnuDivertToCardSecretKeyEncryptor(PGPDigestCalculator s2kDigestCalculator,
                                         byte[] serial)
Method Detail

encryptKeyData

public byte[] encryptKeyData(byte[] key,
                             byte[] keyData,
                             int keyOff,
                             int keyLen)
                      throws PGPException
Specified by:
encryptKeyData in class PBESecretKeyEncryptor
Throws:
PGPException

getKey

public byte[] getKey()
              throws PGPException
Overrides:
getKey in class PBESecretKeyEncryptor
Throws:
PGPException

getCipherIV

public byte[] getCipherIV()
Specified by:
getCipherIV in class PBESecretKeyEncryptor

Bouncy Castle Cryptography Library 1.84