Class PKCS7Verifier

java.lang.Object
org.webpki.pkcs7.PKCS7Verifier

public class PKCS7Verifier extends Object
  • Constructor Details

    • PKCS7Verifier

      public PKCS7Verifier(X509VerifierInterface verifier)
      Creates a PKCS7Verifier using the given verifier object
      Parameters:
      verifier - VerifierInterface containing the certificates and method needed.
  • Method Details

    • getSignatureAlgorithm

      public AsymSignatureAlgorithms getSignatureAlgorithm() throws IOException
      Gets the signature algorithm.
      Returns:
      The algorithm identifier.
      Throws:
      IOException - If anything unexpected happens...
    • verifyMessage

      public byte[] verifyMessage(byte[] message) throws IOException
      Verifies a signed message and returns the signed data.
      Parameters:
      message - the signed data (PKCS#7 message blob).
      Returns:
      the original data.
      Throws:
      IOException - If anything unexpected happens...
    • verifyDetachedMessage

      public void verifyDetachedMessage(byte[] message, byte[] signature) throws IOException
      Verifies a detached (not containing the actual data) signed message.
      Parameters:
      message - the data to be verified.
      signature - the signature (PKCS#7 message blob).
      Throws:
      IOException - If anything unexpected happens...