@cryptography/sha256 (英语)
JavaScript的高性能同步SHA-1执行. 为浏览器优化.
特征
- 快速射击
- 超轻重量
- ECMAScript 3-6
- 类型
- 已测试
设置
软件包 可通过 npm 财务报告和审定财务报表 yarn
npm install @cryptography/sha1
yarn add @cryptography/sha1
您何时应该使用 @ cryptography/ sha1
- 少量投入( < 5kb)
- 关键衍生功能
- 需要100%的浏览器支持
当您不使用此选项时( WebCrypto API 优先选项)
- 显示文件 ( > 5kb)
- 同时散开大量信件
使用量
此套件被优化为小字节输入(<10kb).
此外,还强烈建议在以下情况下执行CPU密集型任务: 网络工作者。 。 。 .
import sha1 from '@cryptography/sha1'
// as Uint32Array([0xa8d627d9, 0x3f518e90, 0x96b6f40e, 0x36d27b76, 0x60fa26d3])
const array = sha1('Hello World!')
// as hex-string: "a8d627d93f518e9096b6f4...."
const hex = sha1('Hello World!', 'hex')
// as binary string: "ÄïükYoUH½LÛ,Zß..."
const raw = sha1('Hello World!', 'binary')
// UInt32Array as input
const buf = new Uint32Array([0xa8d627d9, 0x3f518e90, 0x96b6f40e, 0x36d27b76, 0x60fa26d3, 0x18ef1adc, 0x43da750e, 0x49ebe4be]);
sha1(buf)
用于散列大文件或其他数据chuncks stream() 创造出一股散心的溪流.
sha1.stream().update('Hello World!').digest();
基准
较快 伪造, (中文(简体) ), sjcl 键、鲁沙和 WebCrypto API 页面存档备份,存于互联网档案馆 内 顺序 模式.
试试你自己
捐款
欢迎捐款! 不久将公布捐款准则.