Archive for the 'Hash Codes' Category

Hash Generator - MD5, MD4, SHA-1, SHA-256, SHA-384, SHA-512, and more

Friday, May 16th, 2008

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>’; [...]