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:

  • md2
  • md4
  • md5
  • sha1
  • sha256
  • sha384
  • sha512
  • ripemd128
  • ripemd160
  • ripemd256
  • ripemd320
  • whirlpool
  • tiger128,3
  • tiger160,3
  • tiger192,3
  • tiger128,4
  • tiger160,4
  • tiger192,4
  • snefru
  • gost
  • adler32
  • crc32
  • crc32b
  • haval128,3
  • haval160,3
  • haval192,3
  • haval224,3
  • haval256,3
  • haval128,4
  • haval160,4
  • haval192,4
  • haval224,4
  • haval256,4
  • haval128,5
  • haval160,5
  • haval192,5
  • haval224,5
  • haval256,5

4 thoughts on “Hash Generator – MD5, MD4, SHA-1, SHA-256, SHA-384, SHA-512, and more”

  1. 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 ..

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Current day month ye@r *