I am trying to decrypt a password using decryptBase64 but i got this error
Phalcon\Crypt\Exception: Size of IV is larger than text to decrypt
on my services.php i have
$di->set('crypt', function () use ($config) {
$crypt = new Crypt();
$crypt->setMode(MCRYPT_MODE_CBC);
$crypt->setCipher(MCRYPT_RIJNDAEL_128);
$crypt->setKey($config->application->cryptSalt);
return $crypt;
}, true);
here is the code to decrypt
$this->crypt->decryptBase64(self::$u_pass);
here is the code to encypt
self::$password = $this->crypt->encryptBase64(self::$password);