コード例 #1
0
		public KekRecipientInfo(
            Asn1Sequence seq)
        {
            version = (DerInteger) seq[0];
            kekID = KekIdentifier.GetInstance(seq[1]);
            keyEncryptionAlgorithm = AlgorithmIdentifier.GetInstance(seq[2]);
            encryptedKey = (Asn1OctetString) seq[3];
        }
コード例 #2
0
 public KekRecipientInfo(
     Asn1Sequence seq)
 {
     version = (DerInteger)seq[0];
     kekID   = KekIdentifier.GetInstance(seq[1]);
     keyEncryptionAlgorithm = AlgorithmIdentifier.GetInstance(seq[2]);
     encryptedKey           = (Asn1OctetString)seq[3];
 }
コード例 #3
0
		public KekRecipientInfo(
            KekIdentifier       kekID,
            AlgorithmIdentifier keyEncryptionAlgorithm,
            Asn1OctetString     encryptedKey)
        {
            this.version = new DerInteger(4);
            this.kekID = kekID;
            this.keyEncryptionAlgorithm = keyEncryptionAlgorithm;
            this.encryptedKey = encryptedKey;
        }
コード例 #4
0
 public KekRecipientInfo(
     KekIdentifier kekID,
     AlgorithmIdentifier keyEncryptionAlgorithm,
     Asn1OctetString encryptedKey)
 {
     this.version = new DerInteger(4);
     this.kekID   = kekID;
     this.keyEncryptionAlgorithm = keyEncryptionAlgorithm;
     this.encryptedKey           = encryptedKey;
 }
コード例 #5
0
		/**
		* add a KEK recipient.
		* @param key the secret key to use for wrapping
		* @param keyIdentifier the byte string that identifies the key
		*/
		public void AddKekRecipient(
			string			keyAlgorithm, // TODO Remove need for this parameter
			KeyParameter	key,
			KekIdentifier	kekIdentifier)
		{
			KekRecipientInfoGenerator kekrig = new KekRecipientInfoGenerator();
			kekrig.KekIdentifier = kekIdentifier;
			kekrig.KeyEncryptionKeyOID = keyAlgorithm;
			kekrig.KeyEncryptionKey = key;

			recipientInfoGenerators.Add(kekrig);
		}