Unit

ScCMS

 

Description

The TScCMSSignedData class represents a signed message according to CMS/PKCS #7, described in RFC 5652.

TScCMSSignedData stores the required information and enables signing and verifying of CMS/PKCS #7 messages.

 

To sign content of any type, in the beginning initialize the TScCMSSignedData object with the required content using the Init method. After this, for each signer, create and initialize the TScCMSSignerInfo object specifying a signer's certificate with a private key, required algorithms, signed and unsigned attributes, and other parameters, and sign the information using the ComputeSignature method. And finally, call the Encode method to get an encoded CMS message.

 

To verify CMS/PKCS #7 message, in the beginning, decode the message using the Decode method. This method sets all properties of the TScCMSSignedData object by using the decoded message and a user can retrieve the required properties. The inner contents of the decoded message can be retrieved from the ContentInfo property if it was included in the encoded message. To verify the decoded message use the CheckSignature method specifying the signer's certificate.

 

See Also

Init

CheckSignature

ComputeSignature

 

SecureBridge Components, Copyright © 2007-2024 Devart. All Rights Reserved. Provide Feedback Visit Forum Request Support