Package 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
Constructors Constructor Description SExprParser(PGPDigestCalculatorProvider digestProvider)
Base constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.
-
-
-
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.
- Throws:
java.io.IOException
PGPException
-
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.
- Throws:
java.io.IOException
PGPException
-
-