现在我知道PHP中RSA的公钥和私钥,但貌似C#的RSA中用公钥加密的结果不一致,求指导怎么转,还有就是私钥的话C#还需要很多个其他因子. PHP中公钥格式: $pubKey = '-----BEGIN PUBLIC KEY----- UFOfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCivaicGCwPqH4cyy7S9DoN
现在我知道PHP中RSA的公钥和私钥,但貌似C#的RSA中用公钥加密的结果不一致,求指导怎么转,还有就是私钥的话C#还需要很多个其他因子.
PHP中公钥格式:
$pubKey = '-----BEGIN PUBLIC KEY-----
UFOfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCivaicGCwPqH4cyy7S9DoNrlPF
AFcGrontMObMsoiXXXXXXXXXXXXXXXXXXXXXXLy7+KkElP48MyGlwIQAtNauC8
4lc+TOkyY22u/nIss5wHfG8FbsdT18xmG6F6C+3oAPKYKWd9pkLVKTyM3oN52bUg
O6YBBCC8lw0ukzrZkQIDAQAB
-----END PUBLIC KEY-----';
PHP私钥格式:
$priKey = '-----BEGIN RSA PRIVATE KEY-----
UTOCXAIBAAKBgQCivaicGCwPqH4cyy7S9DoNrlPFAFcGrontMObVsoiJarp8cKYY
rvmCE95vExWuWbbLy7+KkElP48MyGlwIQAtNauC84lc+TOkyY22u/nIss5wUfG8F
bsdT18xmG6F6C+3oAPKYM3oN52bUgO6YBBCC8lw0ukzrZkQIDAQAB
AoGBAJf7Lz+3g06MOFqDlhMEakLkjuQdCzZ/KOvMdKRKP5PFtNY53/0z
gYf12LSybwrkfNLTDjP4UgKSbPo+Wsw+lC9ahCbhhGHZ5wLkKInLKfXfxRL17j7r
fIBKlvYGlai78bTdR+/iTBAkEA07427OGtiic6
dsWfp/fskdS3HJEkFhzwPNtlfsHigT92U/AbzzjuzEdv3oU5uZp7qHwzPzumoDnD
ON47Vz6oJQJBAMTBeRZETTChvSRFfrhw+Wo4gcZ4YrLxpUPP9BqMZtRf
2A2182Zezs+MDgBDtP1BAPYA4qcI5QGPlXrZdNmlyXnPAgrVVE0gtygHx
O8wu9OxROc4WnM0LasDpC8W0//0CQCuc
LniO/wTudHvbvHFO7+7JZZr//28rMLRDuvrfsdHzx2K3L4t+WzrQBcy
6qTPiaT9IT+gqxJRyQkCQF7ozipBsRrN518H46QDUuVOtKsyuCRL1f
en1sHrCd7zEQTq+KxWpYGkPmdsPyq3oo5gaV7/a5Y2w=
-----END RSA PRIVATE KEY-----';
而C#中的RSA公钥格式:
私钥格式:
/hf2dnK7rNfl3lbqghWcpFdu778hUpIEBixCDL5WiBtpkZdpSw90aERmHJYaW2RGvGRi6zSftLh00KHsPcNUMw==
6Cn/jOLrPapDTEp1Fkq+uz++1Do0eeX7HYqi9rY29CqShzCeI7LEYOoSwYuAJ3xA/DuCdQENPSoJ9KFbO4Wsow==
请问只知道PHP的公钥和私钥的情况下如何转成C#版的。