Package org.webpki.pkcs7
Class PKCS7Signer
java.lang.Object
org.webpki.pkcs7.PKCS7Signer
-
Constructor Summary
ConstructorDescriptionPKCS7Signer
(X509SignerInterface signer) Creates an PKCS7Signer using the givenX509SignerInterface
. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
signDetachedMessage
(byte[] message) Signs a message.byte[]
signMessage
(byte[] message) Signs a message.
-
Constructor Details
-
PKCS7Signer
Creates an PKCS7Signer using the givenX509SignerInterface
.- Parameters:
signer
- The signer
-
-
Method Details
-
signDetachedMessage
Signs a message.Creates a detached (not containing the actual data signed) PKCS#7 SignedData message.
- Parameters:
message
- the message to be signed.- Returns:
- DER-encoded PKCS#7 SignedData message.
- Throws:
IOException
- If something unexpected happens...GeneralSecurityException
-
signMessage
Signs a message.Creates a PKCS#7 SignedData message.
- Parameters:
message
- the message to be signed.- Returns:
- DER-encoded PKCS#7 SignedData message.
- Throws:
IOException
- If something unexpected happens...GeneralSecurityException
-