SHA256 · Hex加密

Posted on 2021-08-27 17:30  ${妖气}  阅读(1769)  评论(0编辑  收藏  举报

SHA256 · Hex加密

使用插件:jsHashes https://github.com/h2non/jshashes

// require the module
var Hashes = require('jshashes')
// new SHA1 instance and base64 string encoding
var SHA256 = new Hashes.SHA256().hex_hmac(key, str)
// output to console
console.log('SHA256: ' + SHA256)