W3cubDocs

/Laravel 5.2

Encrypter

class Encrypter extends BaseEncrypter 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.

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

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