[Mono-dev] About System.Core.dll System.Security.Cryptography and Cng

Juho Vähä-Herttua juhovh at gmail.com
Thu Feb 17 07:56:09 EST 2011


Hi,

Sorry for spamming the list a bit, but I think this is quite big chunk 
of code so it's worth to note

16.2.2011 21:55, Juho Vähä-Herttua kirjoitti:
> I started from the most simple one and added some enumerations that are required by the classes, a patch can be seen in my github tree. They should go without any testing, I checked the values match values in .NET, but if someone else wants to check I wouldn't mind.
>
> https://github.com/juhovh/mono/commit/4b0866fb10774644e2976a439c27889f720de12a
>
> Next I should move to the Serializable classes CngKeyBlobFormat and CngProvider that are very similar to CngAlgorithm and CngAlgorithmGroup. I can probably also get the needed unit tests from there.
>
> CngKeyCreationParameters, CngProperty, CngPropertyCollection and CngUIPolicy are also very simple classes but need their own unit tests.

These classes are now also in GitHub in my repository.
https://github.com/juhovh/mono/commit/f148a7641aae2c7a1d3ea66ebf5aff82ef17adc0

The corresponding unit tests can be found in another commit.
https://github.com/juhovh/mono/commit/400f52aba8e0daae23d5e04175fc98ed8f3070e2

Only thing worth to mention was the CngProperty.GetHashCode() method, it 
should be similar to the .NET method and I figured it out by creating a 
lot of CngProperty objects and changing the constructor parameters a bit 
one at the time. I got different GetHashCode() values on .NET and Mono, 
but that might have been some language issue on the String.GetHashCode().

I'll give you guys time to review all this and after getting some 
comments I will start working on the ECDiffieHellman* and ECDsa* classes 
that will most likely take a bit more time to finish.


Juho



More information about the Mono-devel-list mailing list