alexreinert/ARSoft.Tools.Net

.NETCore 2.0 build

Closed this issue · 3 comments

Would it be possible to create a .NETCore 2.0 build?

I was able to build it for .NET Core 2.0 but I had to make the following two changes and will try to test the areas that this affects. If you have any feedback about these two changes, that would be great to receive.

private static readonly SecureRandom _secureRandom = new SecureRandom(new CryptoApiRandomGenerator());

to

private static readonly SecureRandom _secureRandom = new SecureRandom(new VmpcRandomGenerator());

AND

selectedBytes = SubjectPublicKeyInfoFactory.CreateSubjectPublicKeyInfo(DotNetUtilities.FromX509Certificate(certificate).GetPublicKey()).GetDerEncoded();

to

selectedBytes = SubjectPublicKeyInfoFactory.CreateSubjectPublicKeyInfo(PublicKeyFactory.CreateKey(certificate.GetPublicKey())).GetDerEncoded();

You could have spared you the work.
I ported it a long time ago, to .NET Core 1.Whatever
If you had googled it, you would have found it here:
https://github.com/ststeiger/Arsoft

Thank you, that helps out a lot!