private string GetHashNameFromOID (string oid) { switch (oid) { case "1.3.14.3.2.26": return "SHA1"; case "1.2.840.113549.2.5": return "MD5"; default: throw new NotSupportedException (oid + " is an unsupported hash algorithm for RSA signing"); } }