2003-12-07 Sebastien Pouliot <spouliot@videotron.ca>
[mono.git] / mcs / class / System.Security / System.Security.Cryptography.Pkcs / KeyTransRecipientInfo.cs
1 //
2 // KeyTransRecipientInfo.cs - System.Security.Cryptography.Pkcs.KeyTransRecipientInfo
3 //
4 // Author:
5 //      Sebastien Pouliot (spouliot@motus.com)
6 //
7 // (C) 2003 Motus Technologies Inc. (http://www.motus.com)
8 //
9
10 #if NET_1_2
11
12 using System;
13 using System.Collections;
14
15 namespace System.Security.Cryptography.Pkcs {
16
17         public sealed class KeyTransRecipientInfo : RecipientInfo {
18
19                 private byte[] _encryptedKey;
20                 private AlgorithmIdentifier _keyEncryptionAlgorithm;
21                 private SubjectIdentifier _recipientIdentifier;
22                 private int _version;
23
24                 // only accessible from EnvelopedPkcs7.RecipientInfos
25                 internal KeyTransRecipientInfo (byte[] encryptedKey, AlgorithmIdentifier keyEncryptionAlgorithm, SubjectIdentifier recipientIdentifier, int version)
26                         : base (RecipientInfoType.KeyTransport)
27                 {
28                         _encryptedKey = encryptedKey;
29                         _keyEncryptionAlgorithm = keyEncryptionAlgorithm;
30                         _recipientIdentifier = recipientIdentifier;
31                         _version = version;
32                 }
33
34                 public override byte[] EncryptedKey {
35                         get { return _encryptedKey; }
36                 }
37
38                 public override AlgorithmIdentifier KeyEncryptionAlgorithm {
39                         get { return _keyEncryptionAlgorithm; }
40                 } 
41
42                 public override SubjectIdentifier RecipientIdentifier {
43                         get { return _recipientIdentifier; }
44                 } 
45
46                 public override int Version {
47                         get { return _version; }
48                 }
49         }
50 }
51
52 #endif