Home Tutoriais Desenvolvimento PHP – Gerador simples de hash MD5


Esse simples script gera hash MD5 a partir de palavras ou caracteres definidas. Simples, mas útil.
<?php
print"
<title>Gerador de MD5 em PHP</title>
<center><b>Gerador de hash MD5</b></center>
<center>Esse script PHP gera hash MD5 a partir de caracteres definidas</center><br><br>
<form method='post' action='?gerar=md5'>
<br>
<center><font color=#AA000F><input type=text name=caracteres></input></center></pre>
<center><input type=submit value='Gerar MD5'></input></center>
</form><br><br><br>";
if($_GET['gerar'] == "md5"){
$caracteres $_POST['caracteres'];  // pega senha definida para transformar em MD5
$geramd5 substr(md5("$caracteres"),0,32);  // definindo nossa md5
print"<center><b><font color=#000000>Palavra/Caracteres:> [ <font color=#9F0000>$caracteres</font> ]</font></b></center>";
print"<center><b><font color=#000000>MD5:> [ <font color=#9F0000>$geramd5</font> ]</font></b></center>";
}
?>
   

Leave a Reply

This blog is kept spam free by WP-SpamFree.