关于微信支付,退款接口的回调。通过crypto解密有点疑问
nodejs吧
全部回复
仅看楼主
level 2
it_ntc 楼主
var decipher = crypto.createDecipheriv('AES-256-ECB', key,iv);
这个iv参数是一个什么意思! 目前理解是指我的key长度不够32位, 这个iv作为补充? 请问那位大兄弟用NODE做过这个退款的回调!!谢谢了
2018年09月04日 16点09分 1
level 1
同求,我也在做这个,请问
lz
解决了吗
2018年09月06日 14点09分 2
你解决了吗
2018年09月08日 14点09分
level 11
加密的api自己去好好看看
2018年09月09日 15点09分 3
可能是对加密本身理解太弱把, 那个模块左右玩, 感觉就是玩不转。 你做过没?
2018年09月09日 17点09分
level 1
lz还没搞定吗?
2018年09月25日 11点09分 4
level 1
exports.decrypto_wxrefund = function (data, mch_key) {
var md5 = crypto.createHash('md5'),
clearEncoding = 'utf8',
cipherEncoding = 'base64',
cipherChunks = [];
let md5key = md5.update(mch_key).digest('hex').toLowerCase();
let decipher = crypto.createDecipheriv('aes-256-ecb', md5key, '');
decipher.setAutoPadding(true);
cipherChunks.push(decipher.update(data, cipherEncoding, clearEncoding));
cipherChunks.push(decipher.final(clearEncoding));
//console.log(cipherChunks.join(''));
return cipherChunks.join('');
};
2018年09月25日 11点09分 5
level 1
亲测ok
2018年09月25日 11点09分 6
1