Matthias Andreas Benkard | 7b2a3a1 | 2021-08-16 10:57:25 +0200 | [diff] [blame] | 1 | <?php |
| 2 | |
| 3 | namespace Illuminate\Contracts\Encryption; |
| 4 | |
| 5 | interface Encrypter |
| 6 | { |
| 7 | /** |
| 8 | * Encrypt the given value. |
| 9 | * |
| 10 | * @param mixed $value |
| 11 | * @param bool $serialize |
| 12 | * @return string |
| 13 | * |
| 14 | * @throws \Illuminate\Contracts\Encryption\EncryptException |
| 15 | */ |
| 16 | public function encrypt($value, $serialize = true); |
| 17 | |
| 18 | /** |
| 19 | * Decrypt the given value. |
| 20 | * |
| 21 | * @param string $payload |
| 22 | * @param bool $unserialize |
| 23 | * @return mixed |
| 24 | * |
| 25 | * @throws \Illuminate\Contracts\Encryption\DecryptException |
| 26 | */ |
| 27 | public function decrypt($payload, $unserialize = true); |
Matthias Andreas Benkard | 1ba5381 | 2022-12-27 17:32:58 +0100 | [diff] [blame^] | 28 | |
| 29 | /** |
| 30 | * Get the encryption key that the encrypter is currently using. |
| 31 | * |
| 32 | * @return string |
| 33 | */ |
| 34 | public function getKey(); |
Matthias Andreas Benkard | 7b2a3a1 | 2021-08-16 10:57:25 +0200 | [diff] [blame] | 35 | } |