<PackageReference Include="System.Security.Cryptography.Pkcs" Version="11.0.0-preview.3.26207.106" />

System.Security.Cryptography.Pkcs.SignedCms

public sealed class SignedCms
The SignedCms class enables signing and verifying of CMS/PKCS #7 messages.
namespace System.Security.Cryptography.Pkcs { public sealed class SignedCms { public int Version { get; } public ContentInfo ContentInfo { get; } public bool Detached { get; } public X509Certificate2Collection Certificates { get; } public SignerInfoCollection SignerInfos { get; } public SignedCms(SubjectIdentifierType signerIdentifierType, ContentInfo contentInfo, bool detached); public byte[] Encode(); public void Decode(byte[] encodedMessage); public void Decode(ReadOnlySpan<byte> encodedMessage); public void ComputeSignature(); public void ComputeSignature(CmsSigner signer); public void ComputeSignature(CmsSigner signer, bool silent); public void RemoveSignature(int index); public void RemoveSignature(SignerInfo signerInfo); public void CheckSignature(bool verifySignatureOnly); public void CheckSignature(X509Certificate2Collection extraStore, bool verifySignatureOnly); public void CheckHash(); public void AddCertificate(X509Certificate2 certificate); public void RemoveCertificate(X509Certificate2 certificate); public SignedCms(); public SignedCms(SubjectIdentifierType signerIdentifierType); public SignedCms(ContentInfo contentInfo); public SignedCms(SubjectIdentifierType signerIdentifierType, ContentInfo contentInfo); public SignedCms(ContentInfo contentInfo, bool detached); } }