Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Encrypt / Decrypt with Phalcon

Hello folks,

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

ex.:

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

#secure
$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...



84.5k

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();
};
$this->encryption->encrypt($text);
$text = $this->encryption->decrypt($text);


84.5k
Accepted
answer

An encryption class is now available in 1.1.0:

http://docs.phalconphp.com/en/1.1.0/reference/crypt.html

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 ?