From ff8c7a7b70666686beab9d9ea6a4d3205e2d1fa1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Aur=C3=A9lio=20Deleu?= Date: Thu, 11 Mar 2021 23:23:48 +0100 Subject: [PATCH] Add string methods to the contract --- .../Contracts/Encryption/Encrypter.php | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/Illuminate/Contracts/Encryption/Encrypter.php b/src/Illuminate/Contracts/Encryption/Encrypter.php index 4747b68ad00e..5a5c1e0fbb3d 100644 --- a/src/Illuminate/Contracts/Encryption/Encrypter.php +++ b/src/Illuminate/Contracts/Encryption/Encrypter.php @@ -25,4 +25,24 @@ public function encrypt($value, $serialize = true); * @throws \Illuminate\Contracts\Encryption\DecryptException */ public function decrypt($payload, $unserialize = true); + + /** + * Encrypt a string without serialization. + * + * @param string $value + * @return string + * + * @throws \Illuminate\Contracts\Encryption\EncryptException + */ + public function encryptString($value); + + /** + * Decrypt the given string without unserialization. + * + * @param string $payload + * @return string + * + * @throws \Illuminate\Contracts\Encryption\DecryptException + */ + public function decryptString($payload); }