ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,604 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
ASP. NET 6 MVC application invokes openssl for signing using
openssl rsautl -sign -in rasi.bin -inkey riktest.key -out allkiri.bin
How to convert this to .NET 6 so that invoking openssl is not required?
riktest.key is text file containing
-----BEGIN RSA PRIVATE KEY-----
MIIEpAIBAfddAQEArYjDH7msMFifeYc1AG/TkKpcz2LITI73sC0eqnlgmWi3F7PD
Bo8lWrCw32h3v/FFMrK8KuktlnBtsSLaCCz1DWuXORzHaW7EqG8O8QNzFSmhIoqp
...
Does .NET 6 System.Security.Cryptography namespace contain this OpenSsl functionality ?
Hi,
To sign data in .NET you can use following example:
https://learn.microsoft.com/en-us/dotnet/api/system.security.cryptography.rsacryptoserviceprovider.signdata?view=net-6.0
You have to figure out how to import your own key because the example is using an autogenerated key.
Hope this helps!