[mscorlib] Support OID names in RSACryptoServiceProvider.SignData()
authorJonathan Pryor <jonpryor@vt.edu>
Tue, 13 Aug 2013 16:09:56 +0000 (12:09 -0400)
committerJonathan Pryor <jonpryor@vt.edu>
Tue, 13 Aug 2013 16:09:56 +0000 (12:09 -0400)
commitbd130f3a2cc2c16e45775d63a45130ef4448b3ec
tree1b11ca5a0d7ffb2706218f12fa982651c53d674b
parent91bf902e2e78c6a58df40f7bfd7157aedff5fc11
[mscorlib] Support OID names in RSACryptoServiceProvider.SignData()

Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=13953

MSDN documents that RSACryptoServiceProvider.SignData()'s provider
paramter may contain an OID name:

http://msdn.microsoft.com/en-us/library/y2wf1b6k.aspx
> The halg parameter can accept a String, a HashAlgorithm, or a Type.
> The string value can be one of the following:
> * The object identifier (OID) friendly name of the hash algorithm to use,
>   either a name registered in the crypto config file or one in the
>   Crypto API OID table.
> * The OID value. The OID must be one recognized by the Crypto API.
> For example, you could use SignData(new byte[5], "1.3.14.3.2.26") or
> SignData(new byte[5], "sha1"), or SignData(new byte[5], "SHA1").

Add support for this OID names as the provider.
mcs/class/corlib/System.Security.Cryptography/RSACryptoServiceProvider.cs
mcs/class/corlib/Test/System.Security.Cryptography/RSACryptoServiceProviderTest.cs