crypto.createCipher废弃接口替换
RobinzZH opened this issue · comments
RobinzZH commented
crypto.createCipher自node10.0开始已被废弃,需更改为createCipheriv
发现调用接口文件:/bin/tsw/util/auto-report/post.js
module.exports.encode = function(appid, appkey, data) {
const input = Buffer.from(JSON.stringify(data), 'UTF-8');
const buff = zlib.deflateSync(input);
const des = crypto.createCipher('des', (appid + appkey));
ps: 对接接口crypto.createDecipher
也需要替换