使用Node.js和浏览器中的本机加密API的微型哈希模块-JavaScript开发

时间:2021-05-26 00:25:25
【文件属性】:
文件名称:使用Node.js和浏览器中的本机加密API的微型哈希模块-JavaScript开发
文件大小:9KB
文件格式:ZIP
更新时间:2021-05-26 00:25:25
JavaScript Security crypto-hash在Node.js和浏览器中使用本机加密API的Tiny哈希模块,在所有环境中都需要相同的哈希API时很有用。 我的猫称之为同构。 在Node.js中,它使用require('crypto')w加密哈希Tiny哈希模块,该模块在Node.js和浏览器中使用本机加密API,在所有环境中都需要相同的哈希API时很有用。 我的猫称之为同构。 在Node.js中,它使用require('crypto'),而在浏览器中,它使用window.crypto。 浏览器的版本只有约300字节(压缩后压缩)。 安装$ npm install crypto-hash用法const {sha256} = require('crypto-hash'); (异步()=> {console.log(await sha256(':unicorn:')); // =>'5df82936cbf0864be4b7ba801bee3
【文件预览】:
crypto-hash-main
----.gitignore(23B)
----package.json(982B)
----.npmrc(19B)
----index.js(2KB)
----test.js(2KB)
----.github()
--------workflows()
--------funding.yml(113B)
----license(1KB)
----test-browser.js(1KB)
----readme.md(2KB)
----index.test-d.ts(831B)
----.gitattributes(19B)
----browser.js(1KB)
----thread.js(521B)
----.editorconfig(175B)
----index.d.ts(2KB)

网友评论