Hi, I have a simple problem, with Crypt class, loot ak following code:
$cryptPhalcon = new Phalcon\Crypt();
$text = 'how are you';
var_dump($text);
echo '<br> ------------------------- ENCRYPT PHALCON--------------------- <br>';
$encrypt = $cryptPhalcon->encryptBase64($text);
var_dump($encrypt);
echo '<br> ------------------------- DECRYPT PHALCON--------------------- <br>';
$decrypt = $cryptPhalcon->decryptBase64($encrypt);
var_dump($decrypt);
var_dump($decrypt == $text);
and output is:
string 'how are you' (length=11)
------------------------- ENCRYPT PHALCON---------------------
string 'm5fRk+73DaFc5mXTSm4E8aIVj0PL4jCPrmCPILKV0rveuLGVgx5ZqrRUktHp5t2baAyzchhTzqnOgQTQ98sZ1g==' (length=88)
------------------------- DECRYPT PHALCON---------------------
string 'how are you���������������������' (length=32)
boolean false
Can someone help me? I hoped it would return true, but maybe i am mistaken...