
23/06/2014, 11:16
|
 | | | Fecha de Ingreso: diciembre-2009 Ubicación: Beijing
Mensajes: 69
Antigüedad: 15 años, 3 meses Puntos: 0 | |
Respuesta: AES Encrypt y Decrypt Eso solo lo cambie para ver que conseguia, nada.
Bien con esto:
<?php
function encryptData($value){
$key = "7685647tfyr65413285746352413sgfh";
$text = "Hola";
$iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_ECB);
$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);
$crypttext = mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $key, $text, MCRYPT_MODE_ECB, $iv);
return $crypttext;
}
echo 'Encripted: ' . encryptData('Esto es una prueba, si Hola = c927311b8b5c31cc42c8276f714cc9d0, nos vamos de party');
?>
Obtengo:
Encripted: ¦ GÍJ¯\Ä=ÄöÄkãï*gF@%Ä~Ž2 Rl |