class DefusePHPEncryptionAdapter implements EncryptionAdapterInterface (View source)

An encryption adapter for defuse/php-encryption, enabled by default.

Methods

public
string
encrypt(string $plaintext, string $key)

Encrypts the given plain text string with the given key, and returns the output cipher text

public
string
decrypt(string $ciphertext, string $key)

Decrypts the given cipher text using the given key, and returns the output plain text

Details

string encrypt(string $plaintext, string $key)

Encrypts the given plain text string with the given key, and returns the output cipher text

Parameters

string $plaintext
string $key

Return Value

string

Cipher text

Exceptions

EncryptionAdapterException

string decrypt(string $ciphertext, string $key)

Decrypts the given cipher text using the given key, and returns the output plain text

Parameters

string $ciphertext
string $key

Return Value

string

Plain text

Exceptions

EncryptionAdapterException