Documentation

Interface Phalcon\CryptInterface

Source on GitHub

Phalcon\CryptInterface initializer

Methods

abstract public Phalcon\CryptInterface setMethod (unknown $method)

Sets the cipher method

abstract public string getMethod ()

Gets the cipher method

abstract public Phalcon\CryptInterface setKey (string $key)

Sets the encryption key

abstract public string getKey ()

Returns the encryption key

abstract public string encrypt (string $text, [string $key], [unknown $options])

Encrypts a text

abstract public string decrypt (string $text, [string $key], [unknown $options])

Decrypts a text

abstract public string encryptBase64 (string $text, [string $key], [unknown $safe])

Encrypts a text returning the result as a base64 string

abstract public string decryptBase64 (string $text, [string $key], [unknown $safe])

Decrypt a text that is coded as a base64 string

abstract public array getAvailableMethods ()

Returns a list of available methods