interface EncryptionAdapterInterface (View source)

A generic encryption service implementation, responsible for encrypting and decrypting strings.

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