Quantcast
Channel: Security
Viewing all articles
Browse latest Browse all 4737

How to replace openssl signing

$
0
0

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 ?


Viewing all articles
Browse latest Browse all 4737

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>