Advertisement
bluejhon13

PHP Script for Decrypt Hash : allitemz.blogspot.com

Jun 9th, 2012
1,458
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1. <?php
  2.  
  3. $p = empty($_POST['p']) ? null : $_POST['p'];
  4. ?>
  5. <html>
  6. <head><title>Hash testing</title></head>
  7. <style type="text/css">
  8. table {border-collapse: collapse;}
  9. table, td, th {border: solid 1px #ccc;}
  10. th {background: #e1e1e1;border-color: #999;}
  11. td, th {padding: 0.25em;}
  12. td.algo {font-weight: bold;}
  13. tr.on td {background: #f0f0f0;}
  14. </style>
  15. <body>
  16. <h1>String hashing</h1>
  17. <form method="post" action="<?php echo basename(__FILE__) ?>">
  18. <p><label for="p">Enter a string to hash:</label><br /><input id="p" type="text" name="p" value="<?php echo $p ?>" /></p>
  19. <p><input type="submit" name="submit" value="Hash It" /></p>
  20. </form>
  21.  
  22.  
  23. <?php if ($p): ?>
  24. <hr />
  25. <h2>Table of hash values for <em><?php echo $p ?></em> based on algorithm</h2>
  26. <table>
  27. <tr>
  28. <th>Algorithm</th>
  29. <th>Hashed value of <em><?php echo $p ?></em></th>
  30. </tr>
  31.  
  32. <?php $on = false; foreach (hash_algos() as $algo): ?>
  33. <tr<?php if ($on): ?> class="on"<?php endif; ?>>
  34. <td class="algo"><?php echo $algo ?></td>
  35. <td class="hash"><?php echo hash($algo, $p) ?></td>
  36. </tr>
  37. <?php $on = !$on; endforeach; ?>
  38. </table>
  39. <?php endif; ?>
  40. </body>
  41. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement