gpt4 book ai didi

php - 使用 SHA-256 进行 CodeIgniter 哈希

转载 作者:可可西里 更新时间:2023-11-01 00:11:13 25 4
gpt4 key购买 nike

CodeIgniter 使用 MD5 或 SHA1 进行哈希处理:

$str = do_hash($str); // SHA1

$str = do_hash($str, 'md5'); // MD5

但是,我的项目需要 SHA-256。我将如何解决这个问题?

最佳答案

不可以只调用php自带的hash()吗?

$str = hash ( "sha256", $str );

关于php - 使用 SHA-256 进行 CodeIgniter 哈希,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5017232/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com