Encryptable

 trait Winter\Storm\Database\Traits\Encryptable

Properties

protected $encrypterInstance : Illuminate\Contracts\Encryption\Encrypter

Encrypter instance.

protected $originalEncryptableValues : array

List of original attribute values before they were encrypted.

Methods

public static bootEncryptable () : void

Boot the encryptable trait for a model.

Returns
void

public getEncryptableAttributes () : array

Returns a collection of fields that will be encrypted.

Returns
array

public getEncryptableValue (string $key) : string

Decrypts an attribute value

Parameters
Property Description
$key
string

Attribute

Returns
string

Decrypted value

public getEncrypter () : Illuminate\Contracts\Encryption\Encrypter

Provides the encrypter instance.

Returns
Illuminate\Contracts\Encryption\Encrypter

public getOriginalEncryptableValue ($attribute) : mixed

Returns the original values of any encrypted attributes.

Parameters
Property Description
$attribute
mixed
Returns
mixed

public getOriginalEncryptableValues () : array

Returns the original values of any encrypted attributes.

Returns
array

public makeEncryptableValue (string $key, string $value) : string

Encrypts an attribute value and saves it in the original locker.

Parameters
Property Description
$key
string

Attribute

$value
string

Value to encrypt

Returns
string

Encrypted value

public setEncrypter (Illuminate\Contracts\Encryption\Encrypter $encrypter) : void

Sets the encrypter instance.

Parameters
Property Description
$encrypter
Illuminate\Contracts\Encryption\Encrypter
Returns
void
Copyright © 2024 Winter CMS