org.apache.commons.openpgp
Class BouncyCastleOpenPgpSignatureVerifier

java.lang.Object
  extended by org.apache.commons.openpgp.BouncyCastleOpenPgpSignatureVerifier
All Implemented Interfaces:
OpenPgpSignatureVerifier

public class BouncyCastleOpenPgpSignatureVerifier
extends Object
implements OpenPgpSignatureVerifier

Verify signatures using the Bouncy Castle OpenPGP provider.

Author:
Brett Porter

Field Summary
 
Fields inherited from interface org.apache.commons.openpgp.OpenPgpSignatureVerifier
ROLE
 
Constructor Summary
BouncyCastleOpenPgpSignatureVerifier()
           
 
Method Summary
 SignatureStatus verifyDetachedSignature(InputStream data, InputStream signature, KeyRing keyRing)
          Verify a piece of data against a detached signature.
 SignatureStatus verifySignature(InputStream data, KeyRing keyRing)
          Verify a piece of data that was signed with OpenPGP.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BouncyCastleOpenPgpSignatureVerifier

public BouncyCastleOpenPgpSignatureVerifier()
Method Detail

verifySignature

public SignatureStatus verifySignature(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 signed
keyRing - the keyring containing the key used to sign the data
Throws:
OpenPgpException
UnknownKeyException

verifyDetachedSignature

public SignatureStatus verifyDetachedSignature(InputStream data,
                                               InputStream signature,
                                               KeyRing keyRing)
                                        throws OpenPgpException,
                                               UnknownKeyException,
                                               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 signed
signature - the detached signature to verify against the data
keyRing - the keyring containing the key used to sign the data
Throws:
OpenPgpException
UnknownKeyException
IOException


Copyright © 2005-2013 The Apache Software Foundation. All Rights Reserved.