PHP Class Webiny\Component\Security\Token\CryptDrivers\Crypt\Crypt

Inheritance: implements Webiny\Component\Security\Token\CryptDrivers\CryptDriverInterface, use trait Webiny\Component\Crypt\CryptTrait
Show file Open project: Webiny/Framework Class Usage Examples

Public Methods

Method Description
__construct ( ) : Crypt Creates an new crypt driver instance.
decrypt ( string $string, string $key ) : string Decrypts the given $string that was encrypted with the $key.
encrypt ( string $string, string $key ) : string Encrypts the given $string using the $key variable as encryption key.

Method Details

__construct() public method

Creates an new crypt driver instance.
public __construct ( ) : Crypt
return Crypt

decrypt() public method

Decrypts the given $string that was encrypted with the $key.
public decrypt ( string $string, string $key ) : string
$string string Encrypted string.
$key string Key used for encryption.
return string Decrypted string.

encrypt() public method

Encrypts the given $string using the $key variable as encryption key.
public encrypt ( string $string, string $key ) : string
$string string Raw string that should be encrypted.
$key string Security key used for encryption.
return string Encrypted key.