Ejemplo n.º 1
0
		public KekRecipientInfo(
            Asn1Sequence seq)
        {
            version = (DerInteger) seq[0];
            kekID = KekIdentifier.GetInstance(seq[1]);
            keyEncryptionAlgorithm = AlgorithmIdentifier.GetInstance(seq[2]);
            encryptedKey = (Asn1OctetString) seq[3];
        }
Ejemplo n.º 2
0
 public KekRecipientInfo(
     Asn1Sequence seq)
 {
     version = (DerInteger)seq[0];
     kekID   = KekIdentifier.GetInstance(seq[1]);
     keyEncryptionAlgorithm = AlgorithmIdentifier.GetInstance(seq[2]);
     encryptedKey           = (Asn1OctetString)seq[3];
 }
Ejemplo n.º 3
0
		public KekRecipientInfo(
            KekIdentifier       kekID,
            AlgorithmIdentifier keyEncryptionAlgorithm,
            Asn1OctetString     encryptedKey)
        {
            this.version = new DerInteger(4);
            this.kekID = kekID;
            this.keyEncryptionAlgorithm = keyEncryptionAlgorithm;
            this.encryptedKey = encryptedKey;
        }
Ejemplo n.º 4
0
 public KekRecipientInfo(
     KekIdentifier kekID,
     AlgorithmIdentifier keyEncryptionAlgorithm,
     Asn1OctetString encryptedKey)
 {
     this.version = new DerInteger(4);
     this.kekID   = kekID;
     this.keyEncryptionAlgorithm = keyEncryptionAlgorithm;
     this.encryptedKey           = encryptedKey;
 }
		/**
		* 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);
		}