Use PEM encoded RSA private key in .NET

前端 未结 5 2024
囚心锁ツ
囚心锁ツ 2021-01-06 22:21

I have a private key which looks like this:

-----BEGIN RSA PRIVATE KEY----- Some private key data -----END RSA PRIVA

5条回答
  •  孤街浪徒
    2021-01-06 22:37

    Though an older post I though I'd glue my own answer to this question as I bumped into the same challenge earlier this year. I wrote a library for the handling of PEM keys, encryption, decryption, signing and signature verification. There's an complete example solution attached to it (Load-Encrypt-Decrypt-Save), so you should be able to be up running in no-time.

    https://github.com/jrnker/CSharp-easy-RSA-PEM

    Cheers, Christoffer

提交回复
热议问题