function sign() {
const timestamp = parseInt(new Date().getTime() / 1000 + '') + '';
const secret = '111111111111111111111';
const stringify = Buffer.from(`${timestamp}\n${secret}`, 'utf8');
const sign = crypto.createHmac('SHA256', stringify);
sign.update(Buffer.alloc(0));
return sign.digest('base64');
}
飞书自定义机器人签名-node
最新推荐文章于 2024-07-19 18:03:47 发布