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

Org.BouncyCastle.Cms.KeyTransRecipientInfoGenerator

Generates CMS key-transport RecipientInfo values. Used by AddKeyTransRecipient and related overloads; the read-side counterpart is KeyTransRecipientInformation.
protected virtual AlgorithmIdentifier AlgorithmDetails { get; }

Gets the key-encryption algorithm identifier from the key wrapper.

Creates a generator that identifies the recipient from an X.509 certificate.

Creates a generator that identifies the recipient by issuer and serial number.

public KeyTransRecipientInfoGenerator(byte[] subjectKeyID, IKeyWrapper keyWrapper)

Creates a generator that identifies the recipient by subject key identifier.

public RecipientInfo Generate(KeyParameter contentEncryptionKey, SecureRandom random)

Wraps contentEncryptionKey and returns a key-transport RecipientInfo.

protected virtual byte[] GenerateWrappedKey(KeyParameter contentEncryptionKey)

Wraps the content-encryption key using the configured key wrapper.