I need to encrypt a string in my application using the RSA key from a .key file. It contains something like this:
---BEGIN RSA PRIVAET KEY--- MIICHATIABBgQDi+.....OKh4= ---END RSA PRIVATE KEY---
So, I know that I can use the RSACryptoServiceProvider class to encrypt my string, but how can I import a key from a .key file?
source share