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

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

Create a new encrypter instance.

Parameters

string $key
string $cipher

Return Value

void

Exceptions

RuntimeException

at line line 47
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

at line line 62
string encrypt( string $value)

Encrypt the given value.

Parameters

string $value

Return Value

string

Exceptions

EncryptException

at line line 94
string decrypt( string $payload)

Decrypt the given value.

Parameters

string $payload

Return Value

string

Exceptions

DecryptException