2 // Oid.cs - System.Security.Cryptography.Oid
5 // Sebastien Pouliot (spouliot@motus.com)
7 // (C) 2003 Motus Technologies Inc. (http://www.motus.com)
14 namespace System.Security.Cryptography {
16 // Note: Match the definition of framework version 1.2.3400.0 on http://longhorn.msdn.microsoft.com
18 public sealed class Oid {
20 private string _value;
27 public Oid (string oid)
30 throw new ArgumentNullException ("oid");
33 _name = GetName (oid);
36 public Oid (string value, string friendlyName)
44 // FIXME: compatibility with fx 1.2.3400.0
46 // throw new ArgumentNullException ("oid");
49 _name = oid.FriendlyName;
54 public string FriendlyName {
58 throw new ArgumentNullException ("value");
61 _value = GetValue (_name);
66 get { return _value; }
69 throw new ArgumentNullException ("value");
72 _name = GetName (_value);
78 // TODO - find the complete list
79 private string GetName (string value)
82 case "1.2.840.113549.1.1.1":
89 // TODO - find the complete list
90 private string GetValue (string name)
94 return "1.2.840.113549.1.1.1";