Hash Generator – MD5, MD4, SHA-1, SHA-256, SHA-384, SHA-512, and more
May 16th, 2008
4 comments
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:
|
|
|