Hash Generator - MD5, MD4, SHA-1, SHA-256, SHA-384, SHA-512, and more
I’ve created a script that will hash a given string with 38 different algorithms. The algorithms are listed below.
Demo: http://www.randomtools.net/scripts/hash.php
HTML Form:
1 2 3 | <form method="post" action=""> <p>Key to hash: <input type="text" name="key" /> <button type="submit">Submit</button></p> </form> |
PHP Source Code:
1 2 3 4 5 6 7 8 9 10 11 12 | <?php if (isset($_POST['key'])) { $key = $_POST['key']; echo '<hr /><ul>'; foreach (hash_algos() as $algo) { echo '<li><strong>', $algo, ':</strong> <input type="text" value="', hash($algo, $key), '" onclick="this.select();" /></li>'; } echo '</ul>'; } else { echo '<p><strong>This will generate hash codes for the following algorithms:</strong> ', implode(', ', hash_algos()), '</p>'; } ?> |
Included hash types:
|
|
|
![[del.icio.us]](http://www.randomtools.net/wp-content/plugins/bookmarkify/delicious.png)
![[Digg]](http://www.randomtools.net/wp-content/plugins/bookmarkify/digg.png)
![[Facebook]](http://www.randomtools.net/wp-content/plugins/bookmarkify/facebook.png)
![[Google]](http://www.randomtools.net/wp-content/plugins/bookmarkify/google.png)
![[MySpace]](http://www.randomtools.net/wp-content/plugins/bookmarkify/myspace.png)
![[Reddit]](http://www.randomtools.net/wp-content/plugins/bookmarkify/reddit.png)
![[Slashdot]](http://www.randomtools.net/wp-content/plugins/bookmarkify/slashdot.png)
![[StumbleUpon]](http://www.randomtools.net/wp-content/plugins/bookmarkify/stumbleupon.png)
![[Technorati]](http://www.randomtools.net/wp-content/plugins/bookmarkify/technorati.png)
![[Windows Live]](http://www.randomtools.net/wp-content/plugins/bookmarkify/windowslive.png)
![[Yahoo!]](http://www.randomtools.net/wp-content/plugins/bookmarkify/yahoo.png)
June 3rd, 2008 at 8:33am
I enjoyed reading the Hash Generator - MD5, MD4, SHA-1, SHA-256, SHA-384, SHA-512, and more post, although I did not think it was entirely the best approach … there are alternatives which would provide more positive results ..
June 8th, 2008 at 12:46am
Thanks for your comment. What approach would you recommend?