|
string canshu = "POSID=595716469&BRANCHID=220000000&ORDERID=" + Request.QueryString["ORDERID"].Trim()
+ "&PAYMENT=" + Request.QueryString["PAYMENT"].Trim()
+ "&CURCODE=" + Request.QueryString["CURCODE"].Trim()
+ "&REMARK1=" + Request.QueryString["REMARK1"].Trim()
+ "&REMARK2=" + Request.QueryString["REMARK2"].Trim()
+ "&SUCCESS=" + Request.QueryString["SUCCESS"].Trim();
string sign = Request.QueryString["SIGN"].Trim();//加密串 从网银中心获得
string pubKey = System.Configuration.ConfigurationManager.AppSettings["PublicKey"].ToString();//在webconfig 设置公钥
CCBRSA.RSASig rsa;
rsa = new CCBRSA.RSASigClass();
bool bRet;
rsa.setPrivateKey(pubKey);
bRet = rsa.verifySigature(sign, canshu);
为什么bret总是返回false,公钥也是从商户中心下载得到的。难道canshu字符串拼的不对么?有人遇到这种问题么?
没到bool值判断都是false!! |
|