<PackageReference Include="System.Security.Cryptography.Pkcs" Version="10.0.11" />

System.Security.Cryptography.Pkcs.ContentInfo

public sealed class ContentInfo
The ContentInfo class represents the CMS/PKCS #7 ContentInfo data structure as defined in the CMS/PKCS #7 standards document. This data structure is the basis for all CMS/PKCS #7 messages.
public byte[] Content { get; }

The Content property retrieves the content of the CMS/PKCS #7 message.

public Oid ContentType { get; }

The ContentType property retrieves the Oid object that contains the object identifier (OID) of the content type of the inner content of the CMS/PKCS #7 message.

public ContentInfo(byte[] content)

The #ctor constructor creates an instance of the ContentInfo class by using an array of byte values as the data and a default object identifier (OID) that represents the content type.

public ContentInfo(Oid contentType, byte[] content)

The #ctor constructor creates an instance of the ContentInfo class by using the specified content type and an array of byte values as the data.

public static Oid GetContentType(byte[] encodedMessage)

Retrieves the outer content type of an encoded CMS ContentInfo message.