public void AddKeyTransRecipient(X509Certificate cert) { KeyTransRecipientInfoGenerator keyTransRecipientInfoGenerator = new KeyTransRecipientInfoGenerator(); keyTransRecipientInfoGenerator.RecipientCert = cert; recipientInfoGenerators.Add(keyTransRecipientInfoGenerator); }
public void AddKeyTransRecipient(AsymmetricKeyParameter pubKey, byte[] subKeyId) { KeyTransRecipientInfoGenerator keyTransRecipientInfoGenerator = new KeyTransRecipientInfoGenerator(); keyTransRecipientInfoGenerator.RecipientPublicKey = pubKey; keyTransRecipientInfoGenerator.SubjectKeyIdentifier = new DerOctetString(subKeyId); recipientInfoGenerators.Add(keyTransRecipientInfoGenerator); }