Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <title>Hash Algorithms</title>
- <style>
- table {
- font-family: arial, sans-serif;
- border-collapse: collapse;
- width: 100%;
- }
- td, th {
- border: 1px solid #dddddd;
- text-align: left;
- padding: 8px;
- }
- tr:nth-child(even) {
- background-color: #dddddd;
- }
- </style>
- </head>
- <body>
- <form method="GET" action="<?php echo htmlspecialchars($_SERVER['PHP_SELF'])?>">
- <label>Enter your message / password: </label>
- <input type="text" name="password" value="<?php if(isset($_GET['password'])) echo $_GET['password']?>">
- <input type="submit" name="submit" value="Show Table">
- </form>
- <table border=1>
- <tr>
- <th>Hash Alogorithm</th>
- <th>Lenght</th>
- <th>Output</th>
- </tr>
- <?php
- if(isset($_GET['password'])){
- $data = htmlspecialchars($_GET['password']);
- foreach (hash_algos() as $v) {
- $r = hash($v, $data, false);
- echo "
- <tr>
- <td> $v </td>
- <td>".strlen($r)."</td>
- <td> $r </td>
- </tr>
- ";
- }
- }
- ?>
- </table>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement