Class PKCS7Signer

java.lang.Object
org.webpki.pkcs7.PKCS7Signer

public class PKCS7Signer extends Object
  • Constructor Details

  • Method Details

    • signDetachedMessage

      public byte[] signDetachedMessage(byte[] message) throws IOException, GeneralSecurityException
      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

      public byte[] signMessage(byte[] message) throws IOException, GeneralSecurityException
      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