f867f763316552af8a2f64b0abdc2e3dd0a6306f
[mono.git] / mcs / class / corlib / System.Security.Cryptography / SignatureDescription.cs
1 //\r
2 // System.Security.Cryptography SignatureDescription Class implementation\r
3 //\r
4 // Authors:\r
5 //   Thomas Neidhart (tome@sbox.tugraz.at)\r
6 //\r
7 // LAMESPEC: documentation of this class is completely missing in the sdk doc\r
8 // TODO: Implement AsymmetricSignatureFormatter & AsymmetricSignatureDeformatter methods\r
9 \r
10 using System;\r
11 using System.Security;\r
12 \r
13 namespace System.Security.Cryptography {\r
14         \r
15         /// <summary>\r
16         /// LAMESPEC: no sdk doc available for this class by the time of beta 2\r
17         /// </summary>\r
18         [MonoTODO]\r
19         public class SignatureDescription {\r
20                 private string _DeformatterAlgorithm;\r
21                 private string _DigestAlgorithm;                \r
22                 private string _FormatterAlgorithm;             \r
23                 private string _KeyAlgorithm;           \r
24                 \r
25                 /// <summary>\r
26                 /// LAMESPEC: no idea what param el should do??\r
27                 /// </summary>\r
28                 public SignatureDescription (SecurityElement el) {\r
29                         if (el == null)\r
30                                 throw new CryptographicException();\r
31                 }\r
32                 \r
33 \r
34                 /// <summary>\r
35                 /// LAMESPEC: what to do if setting null values?\r
36                 /// </summary>\r
37                 public string DeformatterAlgorithm {\r
38                         get {\r
39                                 return _DeformatterAlgorithm;\r
40                         }\r
41                         set {\r
42                                 _DeformatterAlgorithm = value;\r
43                         }\r
44                 }\r
45 \r
46                 /// <summary>\r
47                 /// LAMESPEC: what to do if setting null values?\r
48                 /// </summary>\r
49                 public string DigestAlgorithm {\r
50                         get {\r
51                                 return _DigestAlgorithm;\r
52                         }\r
53                         set {\r
54                                 _DigestAlgorithm = value;\r
55                         }\r
56                 }\r
57 \r
58                 /// <summary>\r
59                 /// LAMESPEC: what to do if setting null values?\r
60                 /// </summary>\r
61                 public string FormatterAlgorithm {\r
62                         get {\r
63                                 return _FormatterAlgorithm;\r
64                         }\r
65                         set {\r
66                                 _FormatterAlgorithm = value;\r
67                         }\r
68                 }\r
69 \r
70                 /// <summary>\r
71                 /// LAMESPEC: what to do if setting null values?\r
72                 /// </summary>\r
73                 public string KeyAlgorithm {\r
74                         get {\r
75                                 return _KeyAlgorithm;\r
76                         }\r
77                         set {\r
78                                 _KeyAlgorithm = value;\r
79                         }\r
80                 }\r
81 \r
82                 [MonoTODO]\r
83                 public virtual AsymmetricSignatureDeformatter CreateDeformatter(AsymmetricAlgorithm key) \r
84                 {\r
85                         // TODO: Implement\r
86                         return null;\r
87                 }\r
88                 \r
89                 /// <summary>\r
90                 /// Create the hash algorithm assigned with this object\r
91                 /// </summary>\r
92                 public virtual HashAlgorithm CreateDigest()\r
93                 {\r
94                         return HashAlgorithm.Create(_DigestAlgorithm);\r
95                 }\r
96 \r
97                 [MonoTODO]\r
98                 public virtual AsymmetricSignatureFormatter CreateFormatter(AsymmetricAlgorithm key)\r
99                 {\r
100                         // TODO: Implement\r
101                         return null;\r
102                 }\r
103                 \r
104         } // SignatureDescription\r
105         \r
106 } // System.Security.Cryptography\r
107 \r