Bouncy Castle Cryptography Library 1.65

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


Constructor Summary
SExprParser(PGPDigestCalculatorProvider digestProvider)
          Base constructor.
 
Method Summary
 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.

Bouncy Castle Cryptography Library 1.65