function Encode(IncludeContent: boolean = False): TBytes; overload;
procedure Encode(Stream: TStream; IncludeContent: boolean = False); overload;
The Encode method encodes the information in the object into a signed CMS/PKCS #7 message. Signing must be done before encoding.
This method can return an array of byte values that represents the encoded message or can write this result to the Stream parameter.
The IncludeContent parameter is a boolean value that specifies whether the signature of the TScCMSSignedData object is for detached content. If IncludeContent is True, the signed content is included in the CMS/PKCS #7 message along with the signature information. If the IncludeContent state is False (by default), the message does not contain the signed content, and a client can see the content of the message only if it is sent separately.
The encoded message can be decoded by the Decode method.