uk.me.nxg.enormity.gpg
Class GPGVerifier

java.lang.Object
  extended by uk.me.nxg.enormity.gpg.GPGConnection
      extended by uk.me.nxg.enormity.gpg.GPGVerifier

public class GPGVerifier
extends GPGConnection

Verifies signatures


Nested Class Summary
 
Nested classes/interfaces inherited from class uk.me.nxg.enormity.gpg.GPGConnection
GPGConnection.Result<T>
 
Constructor Summary
GPGVerifier()
           
GPGVerifier(File home)
          Creates a new verifier, indicating where GPG should find the needed keys
 
Method Summary
 boolean verify(File documentFile, File signatureFile)
          Verifies a document against a detached signature
 GPGInformation verifyDetails(File documentFile, File signatureFile)
          Verifies a document against a detached signature.
 GPGInformation verifyDetails(File documentFile, String signature)
          Verifies a document against a detached signature.
 
Methods inherited from class uk.me.nxg.enormity.gpg.GPGConnection
completedOK, getStderr, run, run, setStderr, waitFor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GPGVerifier

public GPGVerifier()

GPGVerifier

public GPGVerifier(File home)
Creates a new verifier, indicating where GPG should find the needed keys

Method Detail

verifyDetails

public GPGInformation verifyDetails(File documentFile,
                                    String signature)
                             throws SAXException
Verifies a document against a detached signature. The contents of the stderr stream will be available in GPGConnection.getStderr().

Returns:
a record of the response from GPG
Throws:
SAXException

verifyDetails

public GPGInformation verifyDetails(File documentFile,
                                    File signatureFile)
Verifies a document against a detached signature. The contents of the stderr stream will be available in GPGConnection.getStderr().

Returns:
a record of the response from GPG

verify

public boolean verify(File documentFile,
                      File signatureFile)
Verifies a document against a detached signature

Returns:
true if the signature is value (GOODSIG)


Copyright © 2012. All Rights Reserved.