Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if(isset($_GET['password'])){
- $hash = password_hash($_GET['password'], PASSWORD_DEFAULT);
- }
- if(isset($_GET['verificar'])){
- if (password_verify($_GET['senha'], $_GET['hash'])) {
- $resposta = '<h3>SENHA E HASH COENCIDEM!!!</h3>';
- }else {$resposta = '<h3>SENHA E HASH NÃO COINCIDEM!!!</h3>';}
- }
- ?>
- <html>
- <head>
- <title>PASSWORD HASH GENERATOR</title>
- </head>
- <body>
- <h1>PASSWORD HASH GENERATOR</h1><br>
- <?php
- if(isset($hash)){
- echo '<h3>SENHA INFORMADA: ' . $_GET['password'] . '<br>O PASSWORD HASH É: '.$hash.'</h3><br><br>';
- }
- ?>
- <form method="get">
- <label>Senha: </label>
- <input type="text" name="password">
- <input type="submit" name="">
- </form>
- <h1>VERIFICA PASSWORD</h1>
- <form method="get">
- <label>Senha: </label>
- <input type="text" name="senha">
- <label>hash: </label>
- <input type="text" name="hash">
- <input type="submit" name="verificar">
- </form>
- <?php
- if(isset($resposta)){
- echo $resposta;
- }
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement