huawei-nodejs
Advanced tools
Comparing version 1.0.6 to 1.0.7
@@ -57,9 +57,8 @@ var fs = require('fs'); | ||
case 'RSA2': | ||
return rsa_sha256_Sign(str, param.sign, publicKey, charset); | ||
return rsa_sha256_verify(str, param.sign, publicKey, charset); | ||
default: | ||
return rsa_sha256_Sign(str, param.sign, publicKey, charset); | ||
return rsa_sha256_verify(str, param.sign, publicKey, charset); | ||
} | ||
}; | ||
exports.stringForSign = buildQueryString; | ||
function buildQueryString(param) { | ||
@@ -97,3 +96,3 @@ var str = Object.keys(param).filter(function (key) { | ||
function rsa_sha1_verify(strParam, sign, publicKey, charset) { | ||
//var pKey = fs.readFileSync(publicKey); | ||
var pKey = fs.readFileSync(publicKey); | ||
var verify = crypto.createVerify('RSA-SHA1'); | ||
@@ -106,3 +105,3 @@ verify.update(strParam, charset); | ||
function rsa_sha256_verify(strParam, sign, publicKey, charset) { | ||
//var pKey = fs.readFileSync(publicKey); | ||
var pKey = fs.readFileSync(publicKey); | ||
var verify = crypto.createVerify('RSA-SHA256'); | ||
@@ -109,0 +108,0 @@ verify.update(strParam, charset); |
{ | ||
"name": "huawei-nodejs", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"description": "huawei pay", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7301
154