Encrypter (Encryption)
Encrypter
class Encrypter implements Encrypter (View source)
Methods
void | __construct(string $key, string $cipher = 'AES-128-CBC') Create a new encrypter instance. | |
static bool | supported(string $key, string $cipher) Determine if the given key and cipher combination is valid. | |
string | encrypt(string $value, bool $serialize = true) Encrypt the given value. | |
string | encryptString(string $value) Encrypt a string without serialization. | |
string | decrypt(string $payload, bool $unserialize = true) Decrypt the given value. | |
string | decryptString(string $payload) Decrypt the given string without unserialization. | |
string | getKey() Get the encryption key. |
Details
void __construct(string $key, string $cipher = 'AES-128-CBC')
Create a new encrypter instance.
static bool supported(string $key, string $cipher)
Determine if the given key and cipher combination is valid.
string encrypt(string $value, bool $serialize = true)
Encrypt the given value.
string encryptString(string $value)
Encrypt a string without serialization.
string decrypt(string $payload, bool $unserialize = true)
Decrypt the given value.
string decryptString(string $payload)
Decrypt the given string without unserialization.
string getKey()
Get the encryption key.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.4/Illuminate/Encryption/Encrypter.html