[PHP] Encrypt, Descrypt base64

Iniciado por ANTRAX, Febrero 24, 2010, 11:36:29 AM

Tema anterior - Siguiente tema

0 Miembros y 2 Visitantes están viendo este tema.

Febrero 24, 2010, 11:36:29 AM Ultima modificación: Marzo 22, 2014, 02:27:52 PM por Expermicid
Código: php

<center>
<form method="POST"><input type="text" name="hash2"><br>
<input name="b1" value="Decodificar" type="submit"><br>
<input name="b2" value="Codificar" type="submit"><br>


<?php
// c0ded by v3n0m
$hash = $_POST['hash2'];
$boton = $_POST['b1'];
$boton2 = $_POST['b2'];

if($boton){
$pass = base64_encode($hash);
echo '<br><pre>';
echo "Palabra: " . htmlentities($hash) . "<br>";
echo "Enciptado: $pass <br>";
echo '</pre>';
}

if($boton2){
$pass = base64_decode($hash);
echo '<br><pre>';
echo "Codigo: $hash <br>";
echo "Desenciptado: " . htmlentities($pass) . "<br>";
echo '</pre>';
}


?>
</center>