implements Phalcon\CryptInterface
Provides encryption facilities to phalcon applications
$crypt = new Phalcon\Crypt(); $key = 'le password'; $text = 'This is a secret text'; $encrypted = $crypt->encrypt($text, $key); echo $crypt->decrypt($encrypted, $key);
Sets the cipher algorithm
Returns the current cipher
Sets the encrypt/decrypt mode
Returns the current encryption mode
Sets the encryption key
Returns the encryption key
Returns the padding scheme
Encrypts a text
$encrypted = $crypt->encrypt("Ultra-secret text", "encrypt password");
Decrypts an encrypted text
echo $crypt->decrypt($encrypted, "decrypt password");
Encrypts a text returning the result as a base64 string
Decrypt a text that is coded as a base64 string
Returns a list of available cyphers
Returns a list of available modes
© 2011–2016 Phalcon Framework Team
Licensed under the Creative Commons Attribution License 3.0.
https://docs.phalconphp.com/en/2.0.0/api/Phalcon_Crypt.html