Welcome to mirror list, hosted at ThFree Co, Russian Federation.

SignatureDescription.cs « System.Security.Cryptography « corlib « class « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f867f763316552af8a2f64b0abdc2e3dd0a6306f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
//
// System.Security.Cryptography SignatureDescription Class implementation
//
// Authors:
//   Thomas Neidhart (tome@sbox.tugraz.at)
//
// LAMESPEC: documentation of this class is completely missing in the sdk doc
// TODO: Implement AsymmetricSignatureFormatter & AsymmetricSignatureDeformatter methods

using System;
using System.Security;

namespace System.Security.Cryptography {
	
	/// <summary>
	/// LAMESPEC: no sdk doc available for this class by the time of beta 2
	/// </summary>
	[MonoTODO]
	public class SignatureDescription {
		private string _DeformatterAlgorithm;
		private string _DigestAlgorithm;		
		private string _FormatterAlgorithm;		
		private string _KeyAlgorithm;		
		
		/// <summary>
		/// LAMESPEC: no idea what param el should do??
		/// </summary>
		public SignatureDescription (SecurityElement el) {
			if (el == null)
				throw new CryptographicException();
		}
		

		/// <summary>
		/// LAMESPEC: what to do if setting null values?
		/// </summary>
		public string DeformatterAlgorithm {
			get {
				return _DeformatterAlgorithm;
			}
			set {
				_DeformatterAlgorithm = value;
			}
		}

		/// <summary>
		/// LAMESPEC: what to do if setting null values?
		/// </summary>
		public string DigestAlgorithm {
			get {
				return _DigestAlgorithm;
			}
			set {
				_DigestAlgorithm = value;
			}
		}

		/// <summary>
		/// LAMESPEC: what to do if setting null values?
		/// </summary>
		public string FormatterAlgorithm {
			get {
				return _FormatterAlgorithm;
			}
			set {
				_FormatterAlgorithm = value;
			}
		}

		/// <summary>
		/// LAMESPEC: what to do if setting null values?
		/// </summary>
		public string KeyAlgorithm {
			get {
				return _KeyAlgorithm;
			}
			set {
				_KeyAlgorithm = value;
			}
		}

		[MonoTODO]
		public virtual AsymmetricSignatureDeformatter CreateDeformatter(AsymmetricAlgorithm key) 
		{
			// TODO: Implement
			return null;
		}
		
		/// <summary>
		/// Create the hash algorithm assigned with this object
		/// </summary>
		public virtual HashAlgorithm CreateDigest()
		{
			return HashAlgorithm.Create(_DigestAlgorithm);
		}

		[MonoTODO]
		public virtual AsymmetricSignatureFormatter CreateFormatter(AsymmetricAlgorithm key)
		{
			// TODO: Implement
			return null;
		}
		
	} // SignatureDescription
	
} // System.Security.Cryptography