<PackageReference Include="BouncyCastle.Cryptography" Version="2.8.0-beta.349" />

Org.BouncyCastle.Cms.RecipientInformation

public abstract class RecipientInformation
Base class for CMS recipient information. Use RecipientID to select a recipient, then supply the matching key material to GetContentStream or GetContent.
namespace Org.BouncyCastle.Cms { public abstract class RecipientInformation { public RecipientID RecipientID { get; } public AlgorithmIdentifier KeyEncryptionAlgorithmID { get; } public string KeyEncryptionAlgOid { get; } public Asn1Object KeyEncryptionAlgParams { get; } public byte[] GetContent(ICipherParameters key); public byte[] GetMac(); public abstract CmsTypedStream GetContentStream(ICipherParameters key); } }