uk.me.nxg.xoxa.gpg
Class GPGVerifier

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

public class GPGVerifier
extends GPGConnection

Verifies signatures


Nested Class Summary
 
Nested classes/interfaces inherited from class uk.me.nxg.xoxa.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
 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.xoxa.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

Parameters:
home - the location of the GPG home directory (usually $HOME/.gnupg)
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().

Parameters:
documentFile - the document to be verified
signature - the ASCII-armoured PGP signature to be compared
Returns:
a record of the response from GPG
Throws:
SAXException - on XML-related problems

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().

Parameters:
documentFile - the document to be verified
signatureFile - signature the ASCII-armoured PGP signature to be compared
Returns:
a record of the response from GPG


Copyright © 2015. All rights reserved.