note 103447 added to ref.hash
| From: | Anonymous at osu1 dot php dot net | Date: | Thu, 14 Apr 2011 01:51:55 +0000 |
| Subject: | note 103447 added to ref.hash | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-178815@lists.php.net to get a copy of this message | ||
***Just edited below to add string length!***
<body>
<h1>String hashing</h1>
<form method="post" action="<?php echo basename(__FILE__) ?>">
<p><label for="p">Enter a string to hash:</label><br
/><input id="p" type="text" name="p" value="<?php echo
$p ?>" /></p>
<p><input type="submit" name="submit" value="Hash It"
/></p>
</form>
<?php /* If there is a posted value use it */ ?>
<?php if ($p): ?>
<hr />
<h2>Table of hash values for <em><?php echo $p ?></em> based on
algorithm</h2>
<table>
<tr>
<th>Algorithm</th>
<th>Hashed value of <em><?php echo $p ?></em></th>
<th>Length</th>
</tr>
<?php /* Loop through each hash algorithm, colorizing every other row */ ?>
<?php $on = false; foreach (hash_algos() as $algo): ?>
<tr<?php if ($on): ?> class="on"<?php endif; ?>>
<td class="algo"><?php echo $algo ?></td>
<td class="hash"><?php $b = hash($algo, $p); echo $b;
?></td>
<td class="algo"><?php echo strlen($b) ?></td>
</tr>
<?php $on = !$on; endforeach; ?>
</table>
<?php endif; ?>
</body>
----
Server IP: 69.147.83.197
Probable Submitter: 98.14.192.103
----
Manual Page -- http://www.php.net/manual/en/ref.hash.php
Edit -- https://master.php.net/note/edit/103447
Del: integrated -- https://master.php.net/note/delete/103447/integrated
Del: useless -- https://master.php.net/note/delete/103447/useless
Del: bad code -- https://master.php.net/note/delete/103447/bad+code
Del: spam -- https://master.php.net/note/delete/103447/spam
Del: non-english -- https://master.php.net/note/delete/103447/non-english
Del: in docs -- https://master.php.net/note/delete/103447/in+docs
Del: other reasons-- https://master.php.net/note/delete/103447
Reject -- https://master.php.net/note/reject/103447
Search -- https://master.php.net/manage/user-notes.php