C#加JS的RSA加密程序 // RSA, a suite of routines for performing RSA public-key computations in // Javascr ipt. // // Requires BigInt.js and Barrett.js. // // Copyright 1998-2005 David Shapiro. // // You may use, re-use, abuse, copy, and modify this code to
(去掉注释13.6kb)微信小程序RSA加密模块,用法请参考文件里面的注释。 //加载RSA模块 var RSA = require('rsa.js'); var rsa_res = new RSA.RSAKey(); //配置公钥证书 let public_n = ''; let public_e = ''; rsa_res.setPublic(public_n, public_e); //公钥加密 let str_orignal = 'aaa'; var str_encrypted = r