nodejs使用crypto加密

  |  

sha1加密

1
2
3
const shasum = crypto.createHash('sha1');
shasum.update('要加密的参数');
str.signature = shasum.digest('hex');
文章目录
  1. 1. sha1加密