public class GpgUtils extends Object
Modifier and Type | Class and Description |
---|---|
static class |
GpgUtils.SigningConfig |
Modifier and Type | Method and Description |
---|---|
static org.bouncycastle.openpgp.PGPPublicKey |
getPublicKey(String secretKey)
Get public key from the secret one.
|
static boolean |
isConfigured(String secretKey,
String passphrase)
Check is configured GPG key pair.
|
static byte[] |
signExternal(InputStream input,
String secretKey,
String passphrase)
Sign input data with GPG.
|
static byte[] |
signInline(String input,
String secretKey,
String passphrase)
Sign input data with GPG.
|
public static boolean isConfigured(String secretKey, @Nullable String passphrase)
secretKey
- the GPG secret/private key.passphrase
- the password for the secret key or null
.public static byte[] signExternal(InputStream input, String secretKey, @Nullable String passphrase) throws IOException
secretKey
- the GPG secret/private key.passphrase
- the password for the secret key or null
.IOException
public static byte[] signInline(String input, String secretKey, String passphrase) throws IOException
secretKey
- the GPG secret/private key.passphrase
- the password for the secret key.IOException
public static org.bouncycastle.openpgp.PGPPublicKey getPublicKey(String secretKey) throws IOException
secretKey
- the the GPG secret/private key.PGPPublicKey
object.IOException
Copyright © 2008–2021 Sonatype, Inc.. All rights reserved.