public final class SecretKeys extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
SecretKeys.PassphraseSupplier
Something that can supply a passphrase to decrypt an encrypted secret
key.
|
Modifier and Type | Method and Description |
---|---|
static org.bouncycastle.openpgp.PGPSecretKey |
readSecretKey(InputStream in,
org.bouncycastle.openpgp.operator.PGPDigestCalculatorProvider calculatorProvider,
SecretKeys.PassphraseSupplier passphraseSupplier,
org.bouncycastle.openpgp.PGPPublicKey publicKey)
Reads a GPG secret key from the given stream.
|
public static org.bouncycastle.openpgp.PGPSecretKey readSecretKey(InputStream in, org.bouncycastle.openpgp.operator.PGPDigestCalculatorProvider calculatorProvider, SecretKeys.PassphraseSupplier passphraseSupplier, org.bouncycastle.openpgp.PGPPublicKey publicKey) throws IOException, org.bouncycastle.openpgp.PGPException, CanceledException, UnsupportedCredentialItem, URISyntaxException
in
- InputStream
to read from, doesn't need to be bufferedcalculatorProvider
- for checking digestspassphraseSupplier
- for decrypting encrypted keyspublicKey
- the secret key should be forIOException
- if the stream cannot be parsedorg.bouncycastle.openpgp.PGPException
- if thrown by the underlying S-Expression parser, for instance
when the passphrase is wrongCanceledException
- if thrown by the passphraseSupplier
UnsupportedCredentialItem
- if thrown by the passphraseSupplier
URISyntaxException
- if thrown by the passphraseSupplier
Copyright © 2021 Eclipse JGit Project. All rights reserved.