openss.exe is used to sign from command line using
openssl.exe rsautl -sign -in hash.bin -inkey private.key -out signature.bin
hash.bin - binary data to be signed
private.key - private key file in format
-----BEGIN RSA PRIVATE KEY----- MIIEpQIBAAKCAQEAwq+LrIGkqn66Vm8nb8mlnjDH0y6dkaZOwlyiglsIcWs6Oq82 ...
How to perform same thing from .ASP.NET MVC4 C# application in MVC controller ? Are there some methods in .NET which can create signed data from private key? Which C# code produces same result as openssl ?
Or should openssl.exe executed from controller to sign like from command line? Or shoul bouncycastle or other additional libary used ?