PHP Crypt Demonstration

Use the following form to see the effects of PHP's md5, hash, and crypt functions:

Word/Phrase/Text to be hashed:


The code:

<form action="crypt.php" method="post">
Word/Phrase/Text to be hashed: <input type="text" name="word" />
<input type="submit" value="Crypt it!" />
</form>

<?php

echo "md5 = {'" . md5($_POST['word']) . "'}<br />";
echo "hash = {'" . hash('sha512', $_POST['word']) . "'}<br />";
echo "crypt = {'" . crypt($_POST['word'], CRYPT_SHA512) . "'}<br />";

?>