How to generate a hash value from a string in PHP

2 Answers

0 votes
// string hash ( string $algo , string $data [, bool $raw_output = false ] )
// algo - Name of hashing algorithm (e.g. "md5", "sha256", "haval160,4", etc..)

echo hash('ripemd160', 'A vertical search engine focuse on a specific topic');


/*
run:

580f7bd33cc3c1ae35de139bbacfd980cbcfa46d

*/

 



answered Jun 26, 2016 by avibootz
0 votes
// string hash ( string $algo , string $data [, bool $raw_output = false ] )
// algo - Name of hashing algorithm (e.g. "md5", "sha256", "haval160,4", etc..)

echo hash('tiger192,3', 'A vertical search engine focuse on a specific topic');


/*
run:

13e4a0815fdcdb2522301fc8a0db48c9d7014ffcd49614e3

*/

 



answered Jun 26, 2016 by avibootz

Related questions

1 answer 173 views
2 answers 181 views
181 views asked Oct 12, 2019 by avibootz
1 answer 193 views
1 answer 178 views
178 views asked Jul 19, 2016 by avibootz
...