Hi all
CCNet uses the RSACryptoServiceProvider, and now I get a
Operation is not supported on this platform exception.
What would the best option be for solving this?
° making a dependency on Full.Net is not an option
that would make the port to .Net core obsolete
° using AES encryption ?
° using NETCore.Encrypt
that could solve it, since it has RSA, but seems not active anymore
° ...
Below a console app that simulates the problem.
using System;
using System.Security.Cryptography;
namespace CoreEncryption
{
class Program
{
static void Main(string[] args)
{
try
{
var cp = new CspParameters();
cp.KeyContainerName = "CruiseControl.NET Server";
var provider = new RSACryptoServiceProvider(cp);
// Return the public key
string result = provider.ToXmlString(false);
Console.WriteLine(result);
}
catch (Exception ex)
{
Console.WriteLine(ex.ToString());
}
}
}
}
with kind regards
Ruben Willems