又快又轻JavaScript的SHA-256安全哈希执行 [英] Fast and light JavaScript SHA-256 secure hash implementation

查看:124
本文介绍了又快又轻JavaScript的SHA-256安全哈希执行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在寻找一个散列实现,它;

I'm looking for a hash implementation that is;


  • 安全(几乎不可能反转)

  • 快速(几毫秒)

  • 光(几KB)

  • 在浏览器
  • 运行

理想情况下的SHA-256的实现,因为它被广泛使用,因此广泛针对测试

Ideally a SHA-256 implementation, since it is widely used and therefore widely tested against.

推荐答案

做一些测试建议伪造是最快的SHA-256 JavaScript实现。

Doing some tests suggests that forge is the fastest SHA-256 JavaScript implementation.

有284KB大,但提取SHA-256有关的code减小了体积4.5 KB,看到的 https://github.com/brillout/forge-sha256

It is 284KB big but extracting the SHA-256 related code reduces the size to 4.5 KB, see https://github.com/brillout/forge-sha256.

这篇关于又快又轻JavaScript的SHA-256安全哈希执行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆