Using SHA-256 for CodeIgniter Hashing

CodeIgniter uses MD5 or SHA1 to hash it:

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

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

But my project requires SHA-256. How can i solve this?

+3
source share
1 answer

Can't you just call your own hash ()?

$str = hash ( "sha256", $str );
+8
source

Source: https://habr.com/ru/post/1792532/


All Articles