Package org.webpki.pkcs7
Class PKCS7Verifier
java.lang.Object
org.webpki.pkcs7.PKCS7Verifier
-
Constructor Summary
ConstructorDescriptionPKCS7Verifier
(X509VerifierInterface verifier) Creates a PKCS7Verifier using the given verifier object -
Method Summary
Modifier and TypeMethodDescriptionGets the signature algorithm.void
verifyDetachedMessage
(byte[] message, byte[] signature) Verifies a detached (not containing the actual data) signed message.byte[]
verifyMessage
(byte[] message) Verifies a signed message and returns the signed data.
-
Constructor Details
-
PKCS7Verifier
Creates a PKCS7Verifier using the given verifier object- Parameters:
verifier
-VerifierInterface
containing the certificates and method needed.
-
-
Method Details
-
getSignatureAlgorithm
Gets the signature algorithm.- Returns:
- The algorithm identifier.
- Throws:
IOException
- If anything unexpected happens...
-
verifyMessage
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
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...
-