EncryptInterface
in
An encryption tooling instance.
Table of Contents
Methods
- decode() : string
- Decrypts an encoded string back to its original value.
- decodeMultipleFields() : void
- Decode multiple fields in a data array, modifying the array in place.
- encode() : string
- Encrypts a string and returns an encrypted string that can be decoded.
- encodeMultipleFields() : void
- Encode multiple fields in a data array, modifying the array in place.
Methods
decode()
Decrypts an encoded string back to its original value.
public
decode(string $data) : string
Parameters
- $data : string
-
encoded string to be decrypted
Return values
string —decrypted data
decodeMultipleFields()
Decode multiple fields in a data array, modifying the array in place.
public
decodeMultipleFields(array<string|int, mixed> &$data, array<string|int, mixed> $fields) : void
Parameters
- $data : array<string|int, mixed>
-
The complete data set we're working with
- $fields : array<string|int, mixed>
-
The keys of the fields to encode
encode()
Encrypts a string and returns an encrypted string that can be decoded.
public
encode(string $data) : string
Parameters
- $data : string
-
data to be encrypted
Return values
string —encrypted data
encodeMultipleFields()
Encode multiple fields in a data array, modifying the array in place.
public
encodeMultipleFields(array<string|int, mixed> &$data, array<string|int, mixed> $fields) : void
Parameters
- $data : array<string|int, mixed>
-
The complete data set we're working with
- $fields : array<string|int, mixed>
-
The keys of the fields to encode