Package org.bouncycastle.gpg
Class SExprParser
java.lang.Object
org.bouncycastle.gpg.SExprParser
A parser for secret keys stored in SExpr
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionparseSecretKey
(InputStream inputStream, PBEProtectionRemoverFactory keyProtectionRemoverFactory, KeyFingerPrintCalculator fingerPrintCalculator) Parse a secret key from one of the GPG S expression keys.parseSecretKey
(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 Details
-
SExprParser
Base constructor.- Parameters:
digestProvider
- a provider for digest calculations. Used to confirm key protection hashes.
-
-
Method Details
-
parseSecretKey
public PGPSecretKey parseSecretKey(InputStream inputStream, PBEProtectionRemoverFactory keyProtectionRemoverFactory, PGPPublicKey pubKey) throws 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:
IOException
PGPException
-
parseSecretKey
public PGPSecretKey parseSecretKey(InputStream inputStream, PBEProtectionRemoverFactory keyProtectionRemoverFactory, KeyFingerPrintCalculator fingerPrintCalculator) throws IOException, PGPException Parse a secret key from one of the GPG S expression keys.- Returns:
- a secret key object.
- Throws:
IOException
PGPException
-