We are moving our forum in GitHub Discussions. For questions about Phalcon v3/v4 you can visit here and for Phalcon v5 here.

Encrypt / Decrypt with Phalcon

Hello folks,

anyone know if Phalcon have some kind of encrypt/decrypt function?


$msg = new Messages();
$salt = "[email protected]#";

$secure_msg = $msg->mycolumnmsg->security->encrypt($salt);

#good to read
echo $secure_msg->decrypt($salt);

I couldn't find anything related in Phalcon's Documentation...


Phalcon does not have implemented encryption facilities in the security component or any other component. You can use an encryption component provided by a third one by registering it in the di:

$di['encryption'] = function() {
    return new MyEncryption();
$text = $this->encryption->decrypt($text);


An encryption class is now available in 1.1.0:


Great :) lighting fast development Waiting for green light when i can use 1.1.0 version in production

Is it possible to set this class encrypt/decrypt to not use backslah character in the encrypt output ?