{
$clave = 'Tu Clave secreta, aquí pon lo que quieras';
$method = 'aes-256-cbc';
$iv = base64_decode("C8fBxl1g7EWtYTL1/M8jfstw==");
return openssl_encrypt(base64_encode($valor), $method, $clave, false, $iv);}
function desencriptar($valor)
{
$clave = 'Tu Clave secreta, aquí pon lo que quieras';
$method = 'aes-256-cbc';
$iv = base64_decode("C8fBxl1g7EWtYTL1/M8jfstw==");
return base64_decode(openssl_decrypt($valor, $method, $clave, false, $iv));
}
No hay comentarios:
Publicar un comentario