Contents · Forum Home · StreamSec Tools 4.1.5.363 documentation

methodTstCustomMPCMSBroker.Decode

function Decode(aStream, aDest: TStream; var aActions: TContentTypeArray): Boolean; overload;
Broker that combines a SignedData and an EnvelopedData component so an app can process arbitrarily nested CMS messages (e.g. sign-then-encrypt) with a single call. Wire its EnvelopedData and SignedData properties to the helper components; the Broker drives them recursively. Auto-detects the outer CMS content type of aStream, unwraps each nested layer (recursing through signed/enveloped envelopes) and writes the innermost content to aDest. On success aActions is filled, innermost first, with the content types that were peeled off, so the caller can see how the message was protected.
function Decode(aStream, aDest: TStream; aActionDescriptions: TStrings): Boolean; overload;
As the array overload, but reports the peeled layers (and, per signer, the signing certificate's distinguished-name fields) as human-readable lines appended to aActionDescriptions. Use this when you want a displayable summary of who signed / who it was encrypted to.