Bouncy Castle Cryptography Library 1.79

org.bouncycastle.gpg
Class SExprParser

java.lang.Object
  |
  +--org.bouncycastle.gpg.SExprParser

public class SExprParser
extends java.lang.Object

A parser for secret keys stored in SExpr


Inner Class Summary
static interface SExprParser.ProtectionFormatTypeTags
           
 
Constructor Summary
SExprParser(PGPDigestCalculatorProvider digestProvider)
          Base constructor.
 
Method Summary
static PublicKeyAlgorithmTags[] getPGPSecretKey(PBEProtectionRemoverFactory keyProtectionRemoverFactory, KeyFingerPrintCalculator fingerPrintCalculator, PGPPublicKey pubKey, int maxDepth, int type, SExpression expression, java.lang.String keyType, PGPDigestCalculatorProvider digestProvider)
           
static int getProtectionType(java.lang.String str)
           
 PGPSecretKey parseSecretKey(java.io.InputStream inputStream, PBEProtectionRemoverFactory keyProtectionRemoverFactory, KeyFingerPrintCalculator fingerPrintCalculator)
          Parse a secret key from one of the GPG S expression keys.
 PGPSecretKey parseSecretKey(java.io.InputStream inputStream, PBEProtectionRemoverFactory keyProtectionRemoverFactory, PGPPublicKey pubKey)
          Parse a secret key from one of the GPG S expression keys associating it with the passed in public key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SExprParser

public SExprParser(PGPDigestCalculatorProvider digestProvider)
Base constructor.
Parameters:
digestProvider - a provider for digest calculations. Used to confirm key protection hashes.
Method Detail

parseSecretKey

public PGPSecretKey parseSecretKey(java.io.InputStream inputStream,
                                   PBEProtectionRemoverFactory keyProtectionRemoverFactory,
                                   PGPPublicKey pubKey)
                            throws java.io.IOException,
                                   PGPException
Parse a secret key from one of the GPG S expression keys associating it with the passed in public key.
Returns:
a secret key object.

parseSecretKey

public PGPSecretKey parseSecretKey(java.io.InputStream inputStream,
                                   PBEProtectionRemoverFactory keyProtectionRemoverFactory,
                                   KeyFingerPrintCalculator fingerPrintCalculator)
                            throws java.io.IOException,
                                   PGPException
Parse a secret key from one of the GPG S expression keys.
Returns:
a secret key object.

getPGPSecretKey

public static PublicKeyAlgorithmTags[] getPGPSecretKey(PBEProtectionRemoverFactory keyProtectionRemoverFactory,
                                                       KeyFingerPrintCalculator fingerPrintCalculator,
                                                       PGPPublicKey pubKey,
                                                       int maxDepth,
                                                       int type,
                                                       SExpression expression,
                                                       java.lang.String keyType,
                                                       PGPDigestCalculatorProvider digestProvider)
                                                throws PGPException,
                                                       java.io.IOException

getProtectionType

public static int getProtectionType(java.lang.String str)

Bouncy Castle Cryptography Library 1.79