org.apache.commons.openpgp
Class BouncyCastleOpenPgpSignatureVerifier
java.lang.Object
org.apache.commons.openpgp.BouncyCastleOpenPgpSignatureVerifier
- All Implemented Interfaces:
- OpenPgpSignatureVerifier
public class BouncyCastleOpenPgpSignatureVerifier
- extends java.lang.Object
- implements OpenPgpSignatureVerifier
Verify signatures using the Bouncy Castle OpenPGP provider.
- Author:
- Brett Porter
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BouncyCastleOpenPgpSignatureVerifier
public BouncyCastleOpenPgpSignatureVerifier()
verifySignature
public SignatureStatus verifySignature(java.io.InputStream data,
KeyRing keyRing)
throws OpenPgpException,
UnknownKeyException
- Description copied from interface:
OpenPgpSignatureVerifier
- Verify a piece of data that was signed with OpenPGP.
- Specified by:
verifySignature
in interface OpenPgpSignatureVerifier
- Parameters:
data
- the data that was signedkeyRing
- the keyring containing the key used to sign the data
- Throws:
OpenPgpException
UnknownKeyException
verifyDetachedSignature
public SignatureStatus verifyDetachedSignature(java.io.InputStream data,
java.io.InputStream signature,
KeyRing keyRing,
boolean asciiArmored)
throws OpenPgpException,
UnknownKeyException,
java.io.IOException
- Description copied from interface:
OpenPgpSignatureVerifier
- Verify a piece of data against a detached signature.
- Specified by:
verifyDetachedSignature
in interface OpenPgpSignatureVerifier
- Parameters:
data
- the data to that was signedsignature
- the detached signature to verify against the datakeyRing
- the keyring containing the key used to sign the dataasciiArmored
- whether the signature is ascii armored
- Throws:
OpenPgpException
UnknownKeyException
java.io.IOException