文件名称:C#微信企业付款到银行卡demo真实可用
文件大小:3.08MB
文件格式:7Z
更新时间:2021-05-14 11:20:17
微信 企业付款 C#
// 加载公钥 RsaKeyParameters pubkey; using (var sr = new StreamReader(ConfigurationManager.AppSettings["PubKey"])) { var pemReader = new Org.BouncyCastle.OpenSsl.PemReader(sr); pubkey = (RsaKeyParameters)pemReader.ReadObject(); } // 初始化cipher var cipher = (BufferedAsymmetricBlockCipher)CipherUtilities.GetCipher("RSA/ECB/OAEPWITHSHA-1ANDMGF1PADDING"); cipher.Init(true, pubkey); // 加密message var message = Encoding.UTF8.GetBytes(EncryptString); var output = EncryptUtil.Encrypt(message, cipher); R = Convert.ToBase64String(output);