-
Notifications
You must be signed in to change notification settings - Fork 85
/
Copy pathEncrypter.php
49 lines (43 loc) · 1.04 KB
/
Encrypter.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php
namespace Illuminate\Contracts\Encryption;
interface Encrypter
{
/**
* Encrypt the given value.
*
* @param mixed $value
* @param bool $serialize
* @return string
*
* @throws \Illuminate\Contracts\Encryption\EncryptException
*/
public function encrypt(#[\SensitiveParameter] $value, $serialize = true);
/**
* Decrypt the given value.
*
* @param string $payload
* @param bool $unserialize
* @return mixed
*
* @throws \Illuminate\Contracts\Encryption\DecryptException
*/
public function decrypt($payload, $unserialize = true);
/**
* Get the encryption key that the encrypter is currently using.
*
* @return string
*/
public function getKey();
/**
* Get the current encryption key and all previous encryption keys.
*
* @return array
*/
public function getAllKeys();
/**
* Get the previous encryption keys.
*
* @return array
*/
public function getPreviousKeys();
}