Inheritance: RecipientInfoGenerator
        public void AddKeyTransRecipient(X509Certificate cert)
        {
            KeyTransRecipientInfoGenerator keyTransRecipientInfoGenerator = new KeyTransRecipientInfoGenerator();

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

            keyTransRecipientInfoGenerator.RecipientPublicKey   = pubKey;
            keyTransRecipientInfoGenerator.SubjectKeyIdentifier = new DerOctetString(subKeyId);
            recipientInfoGenerators.Add((object)keyTransRecipientInfoGenerator);
        }
        /**
         * add a recipient.
         *
         * @param cert recipient's public key certificate
         * @exception ArgumentException if there is a problem with the certificate
         */
        public void AddKeyTransRecipient(
            X509Certificate cert)
        {
            KeyTransRecipientInfoGenerator ktrig = new KeyTransRecipientInfoGenerator();

            ktrig.RecipientCert = cert;

            recipientInfoGenerators.Add(ktrig);
        }
Example #4
0
		/**
		* add a recipient
		*
		* @param key the public key used by the recipient
		* @param subKeyId the identifier for the recipient's public key
		* @exception ArgumentException if there is a problem with the key
		*/
		public void AddKeyTransRecipient(
			AsymmetricKeyParameter	pubKey,
			byte[]					subKeyId)
		{
			KeyTransRecipientInfoGenerator ktrig = new KeyTransRecipientInfoGenerator();
			ktrig.RecipientPublicKey = pubKey;
			ktrig.SubjectKeyIdentifier = new DerOctetString(subKeyId);

			recipientInfoGenerators.Add(ktrig);
		}
Example #5
0
		/**
		 * add a recipient.
		 *
		 * @param cert recipient's public key certificate
		 * @exception ArgumentException if there is a problem with the certificate
		 */
		public void AddKeyTransRecipient(
			X509Certificate cert)
		{
			KeyTransRecipientInfoGenerator ktrig = new KeyTransRecipientInfoGenerator();
			ktrig.RecipientCert = cert;

			recipientInfoGenerators.Add(ktrig);
		}