Publicado Por
Unknown
//
17:29
//
15 oct 2014
Código:
<form action="" method="post"><b> <center><font size="6" face="Verdana" color="green">Simple MD5 & SHA1 Creator <font size="2" color="red"><br><br><br> Plz Enter Your Text : <input type="text" name="text"><br><br> <input type="submit" name="submit" Value="Submit !"><br><br></b> MD5 : <textarea name="textarea" style="border:1px dotted green; width: 355px; height: 25px; background-color:white; font-family:Tahoma; font-size:15pt; color:black"> <?php if(isset($_POST['submit'])) { $ok = md5($_REQUEST['text']); echo($ok); } ?></textarea><br><br> SHA1 : <textarea name="textarea" style="border:1px dotted green; width: 450px; height: 25px; background-color:white; font-family:Arial; font-size:15pt; color:black"> <?php if(isset($_POST['submit'])) { $ok = sha1($_REQUEST['text']); echo($ok); } ?></textarea>
<title>Hashes</title>
<style type="text/css">
#hash{
border-style: dotted;
border-radius: 3px;
border-color: green;
}
</style>
<?php
$hashes = hash_algos();
//print_r($hashes);
echo '<form method="post" action="">';
echo '<input type="text" name="encriptar">';
echo '<select name="hashes">';
foreach($hashes as $hash){
echo '<option value="'.$hash.'">'.$hash.'</option>';
}
echo '<input type="submit" value="Encriptar">';
echo '</select>';
echo '</form>';
if($_SERVER['REQUEST_METHOD'] == 'POST' && !empty($_POST['encriptar']) && !empty($_POST['hashes'])){
$algoritmo = $_POST['hashes'];
$dato = $_POST['encriptar'];
echo '<p style="color:red"><b>' .$algoritmo.'</b>: <span id="hash">'.hash($algoritmo, $dato).'</span></p>';
}
?>
Creditos Zan y arthusu
0 comentarios: