本文介紹了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 olderPHP
) - 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 功能的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!
【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!