C#部分:
//公钥大素数
BigInteger biE = BigInteger.Parse(rsa_key, System.Globalization.NumberStyles.HexNumber);
//大整数N
BigInteger biN = BigInteger.Parse("10001", System.Globalization.NumberStyles.HexNumber);
byte[] publicKeyByte2 = biE.ToByteArray();
byte[] exponentByte2 = biN.ToByteArray();
using (RSACryptoServiceProvider RSA = new RSACryptoServiceProvider())
{
RSAParameters RSAKeyInfo = new RSAParameters();
UTF8Encoding ByteConverter = new UTF8Encoding();
RSAKeyInfo.Modulus = publicKeyByte2.Reverse().ToArray();
RSAKeyInfo.Exponent = exponentByte2.Reverse().ToArray();
RSA.ImportParameters(RSAKeyInfo);
byte[] passwordByte = ByteConverter.GetBytes(content);
var encryptReuslt = RSA.Encrypt(passwordByte, RSAEncryptionPadding.Pkcs1);
//var Ciphertext = Convert.ToBase64String(encryptReuslt);
var encrypted = BitConverter.ToString(encryptReuslt).Replace("-", "");
//encrypted = GetHexFromChs(Ciphertext);
}