RSACryptoServiceProvider initialize with own public key and private key

别来无恙 提交于 2019-11-29 13:32:35

The fields are horribly named and it is confusing you. The Exponent field is really the public exponent for a public key. The private exponent for a private key is the D field.

It is not your fault that MSDN documentation sucks.

user5507004

You have to convert base 64:

byte[] modulusBytes = Convert.FromBase64String(modulus);
byte[] exponentBytes = Convert.FromBase64String(exponent);
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!