A way to decrypt the encrypted values. This only works on values encrypted with the same key and salt as you are trying to decrypt.
Example:
Dummy
Get a dummy example of the decrypted value for displaying purposes. It only shows the first 3 chars and adds a 'β'-char for every other character in the string.
Contains dummy character
Function to check if a string contains dummy characters. This is so you can prevent the saving of a submitted dummy-ised value
Decrypt object values
Function to decrypt a encrypted object. For example when getting a entry from a database, you can decrypt the object at once
$submitted_value = 'jesβββββββββββββββββββ';
$EncryptionController = new EncryptionController();
if (!$EncryptionController->containsDummyCharacter($submitted_value)){
// Do stuff
}
$user = User::find(1);
$EncryptionController = new EncryptionController();
$user = $EncryptionController->decryptObjectValues($user);