PHP SHA3 功能 [英] PHP SHA3 functionality

查看:29
本文介绍了PHP SHA3 功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有允许我使用 SHA3-512 的框架或函数?我不想要像 Strawbrary

Is there a framework or function that allows me to use SHA3-512? I don't want a extension like Strawbrary

推荐答案

有可能.

也许为时已晚,但我已经在这里进行了pure-PHP 实现一个>:

Maybe too late, but I've worked on a pure-PHP implementation here:

  • SHA3-224/256/384/512
  • SHAKE128/256(任意输出大小)
  • LGPL 3+
  • PHP 5.2+ 中工作(在较旧的 PHP 上慢得多)
  • 无需扩展.
  • 经过中等程度的测试.
  • 基于 C 中的(公共领域)参考实现.
  • 任意输入大小.
  • SHA3-224/256/384/512
  • SHAKE128/256 (arbitrary output size)
  • LGPL 3+
  • Works in PHP 5.2+ (considerably slower on older PHP)
  • No extensions required.
  • Moderately well tested.
  • Based on the (public domain) reference implementation in C.
  • Arbitrary input size.

它是在 PHP 中简单快速的实现(这意味着 远比 C 慢).由于这纯粹是受 CPU 限制",PHP 7.0 的运行速度比 PHP 5.6 快 4 倍.(此处为 55kB/s)

It is a simple and fast implementation in PHP (which means far slower than C). Since this is purely "CPU-bound", PHP 7.0 runs 4x faster than PHP 5.6. (55kB/s here)

输入很小就可以了.正确处理大量输入,只占用 CPU 几分钟.

Fine with a small input. Correctly handles a huge input, just hogs CPU for minutes.

希望能帮到你.

这篇关于PHP SHA3 功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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