Tencent / TSW

Tencent Server Web

Home Page:https://tswjs.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

crypto.createCipher废弃接口替换

RobinzZH opened this issue · comments

crypto.createCipher自node10.0开始已被废弃,需更改为createCipheriv

image

发现调用接口文件:/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也需要替换