public class PGPHelper extends Object
Constructor and Description |
---|
PGPHelper() |
Modifier and Type | Method and Description |
---|---|
static org.bouncycastle.openpgp.PGPPublicKey |
getPublicKey(byte[] block,
long keyID)
Get a public key from a public key block.
|
static org.bouncycastle.openpgp.PGPSignature |
getSignature(byte[] signature)
Get a signature from its bytes
|
static boolean |
verifySignature(InputStream file,
InputStream signature,
org.bouncycastle.openpgp.PGPPublicKey key)
Verify a PGP signature.
|
public static org.bouncycastle.openpgp.PGPSignature getSignature(byte[] signature) throws Exception
signature
- the bytesException
public static org.bouncycastle.openpgp.PGPPublicKey getPublicKey(byte[] block, long keyID) throws Exception
block
- the public key blockkeyID
- the key idException
- anything that would prevent to obtain the keypublic static boolean verifySignature(InputStream file, InputStream signature, org.bouncycastle.openpgp.PGPPublicKey key) throws Exception
file
- the filesignature
- the signaturekey
- the public keyException
- anything preventing the verification to happenCopyright © 2021 Eclipse. All rights reserved.