PHP Interface Phalcon\Legacy\CryptInterface

Interface for Phalcon\Legacy\Crypt
Afficher le fichier Open project: phalcon/incubator

Méthodes publiques

Méthode Description
decrypt ( string $text, string $key = null ) : string Decrypts a text
decryptBase64 ( string $text, mixed $key = null ) : string Decrypt a text that is coded as a base64 string
encrypt ( string $text, mixed $key = null ) : string Encrypts a text
encryptBase64 ( string $text, mixed $key = null ) : string Encrypts a text returning the result as a base64 string
getAvailableCiphers ( ) : array Returns a list of available cyphers
getAvailableModes ( ) : array Returns a list of available modes
getCipher ( ) : string Returns the current cipher
getKey ( ) : string Returns the encryption key
getMode ( ) : string Returns the current encryption mode
setCipher ( string $cipher ) : Phalcon\Legacy\CryptInterface Sets the cipher algorithm
setKey ( string $key ) : Phalcon\Legacy\CryptInterface Sets the encryption key
setMode ( string $mode ) : Phalcon\Legacy\CryptInterface Sets the encrypt/decrypt mode

Method Details

decrypt() public méthode

Decrypts a text
public decrypt ( string $text, string $key = null ) : string
$text string
$key string
Résultat string

decryptBase64() public méthode

Decrypt a text that is coded as a base64 string
public decryptBase64 ( string $text, mixed $key = null ) : string
$text string
$key mixed
Résultat string

encrypt() public méthode

Encrypts a text
public encrypt ( string $text, mixed $key = null ) : string
$text string
$key mixed
Résultat string

encryptBase64() public méthode

Encrypts a text returning the result as a base64 string
public encryptBase64 ( string $text, mixed $key = null ) : string
$text string
$key mixed
Résultat string

getAvailableCiphers() public méthode

Returns a list of available cyphers
public getAvailableCiphers ( ) : array
Résultat array

getAvailableModes() public méthode

Returns a list of available modes
public getAvailableModes ( ) : array
Résultat array

getCipher() public méthode

Returns the current cipher
public getCipher ( ) : string
Résultat string

getKey() public méthode

Returns the encryption key
public getKey ( ) : string
Résultat string

getMode() public méthode

Returns the current encryption mode
public getMode ( ) : string
Résultat string

setCipher() public méthode

Sets the cipher algorithm
public setCipher ( string $cipher ) : Phalcon\Legacy\CryptInterface
$cipher string
Résultat Phalcon\Legacy\CryptInterface

setKey() public méthode

Sets the encryption key
public setKey ( string $key ) : Phalcon\Legacy\CryptInterface
$key string
Résultat Phalcon\Legacy\CryptInterface

setMode() public méthode

Sets the encrypt/decrypt mode
public setMode ( string $mode ) : Phalcon\Legacy\CryptInterface
$mode string
Résultat Phalcon\Legacy\CryptInterface