2003-11-09 Sebastien Pouliot <spouliot@videotron.ca>
[mono.git] / mcs / class / corlib / System.Security.Cryptography / CspKeyContainerInfo.cs
1 //
2 // CspKeyContainerInfo.cs: Information about CSP based key containers
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
14 namespace System.Security.Cryptography {
15
16         public sealed class CspKeyContainerInfo {
17
18                 private CspParameters _params;
19                 internal bool _random;
20
21                 // constructors
22
23                 public CspKeyContainerInfo (CspParameters parameters) 
24                 {
25                         _params = parameters;
26                         _random = true; // by default we always generate a key
27                 }
28
29                 // properties
30
31                 // always true for Mono
32                 public bool Accessible {
33                         get { return true; }
34                 }
35                 
36                 // always true for Mono
37                 public bool Exportable {
38                         get { return true; }
39                 }
40                 
41                 // always false for Mono
42                 public bool HardwareDevice {
43                         get { return false; }
44                 }
45                 
46                 public string KeyContainerName { 
47                         get { return _params.KeyContainerName; }
48                 }
49                 
50                 public KeyNumber KeyNumber { 
51                         get { return (KeyNumber)_params.KeyNumber; }
52                 }
53                 
54                 // always false for Mono
55                 public bool MachineKeyStore {
56                         get { return false; }
57                 }
58                 
59                 // always false for Mono
60                 public bool Protected {
61                         get { return false; }
62                 }
63                 
64                 public string ProviderName {
65                         get { return _params.ProviderName; }
66                 }
67                 
68                 public int ProviderType { 
69                         get { return _params.ProviderType; }
70                 }
71                 
72                 // true if generated, false if imported
73                 public bool RandomlyGenerated {
74                         get { return _random; }
75                 }
76                 
77                 // always false for Mono
78                 public bool Removable {
79                         get { return false; }
80                 }
81                 
82                 public string UniqueKeyContainerName {
83                         get { return _params.ProviderName + "\\" + _params.KeyContainerName; }
84                 }
85         }
86 }
87
88 #endif