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)

Encrypt the given value.

string decrypt(string $payload)

Decrypt the given value.

string getKey()

Get the encryption key.

Details

void __construct(string $key, string $cipher = 'AES-128-CBC')

Create a new encrypter instance.

Parameters

string $key
string $cipher

Return Value

void

Exceptions

RuntimeException

static bool supported(string $key, string $cipher)

Determine if the given key and cipher combination is valid.

Parameters

string $key
string $cipher

Return Value

bool

string encrypt(string $value)

Encrypt the given value.

Parameters

string $value

Return Value

string

Exceptions

EncryptException

string decrypt(string $payload)

Decrypt the given value.

Parameters

string $payload

Return Value

string

Exceptions

DecryptException

string getKey()

Get the encryption key.

Return Value

string

© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.3/Illuminate/Encryption/Encrypter.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部