Skip to content

Instantly share code, notes, and snippets.

View NeftaliAcosta's full-sized avatar

Neftalí Acosta NeftaliAcosta

View GitHub Profile
@NeftaliAcosta
NeftaliAcosta / encriptar-desencriptar.php
Created April 25, 2017 17:19 — forked from neomadara/encriptar-desencriptar.php
encriptar y desencriptar MD5
<?php
function encriptar($texto){
$key='palabraclaveparalacodificacionydecodificacion'; // Una clave de codificacion, debe usarse la misma para encriptar y desencriptar
$encrypted = base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, md5($key), $cadena, MCRYPT_MODE_CBC, md5(md5($key))));
return $encrypted;
};
function desencriptar($texto){