1 | <?php |
||
12 | class EncryptManager extends CacheManager |
||
13 | { |
||
14 | /** |
||
15 | * @var string |
||
16 | */ |
||
17 | const ENCRYPT_METHOD = 'AES256'; |
||
18 | |||
19 | /** |
||
20 | * @var string |
||
21 | */ |
||
22 | public static $encryptKey; |
||
23 | |||
24 | /** |
||
25 | * @return string |
||
26 | */ |
||
27 | public static function getEncryptKey() |
||
31 | |||
32 | /** |
||
33 | * @param string $encryptKey |
||
34 | */ |
||
35 | public static function setEncryptKey($encryptKey) |
||
39 | |||
40 | /** |
||
41 | * @param $string |
||
42 | * @return string |
||
43 | */ |
||
44 | public static function encrypt($string) |
||
48 | |||
49 | /** |
||
50 | * @param $string |
||
51 | * @return string |
||
52 | */ |
||
53 | public static function decrypt($string) |
||
57 | |||
58 | /** |
||
59 | * @return bool|string |
||
60 | */ |
||
61 | protected static function getIv() |
||
65 | |||
66 | /** |
||
67 | * @param $array |
||
68 | * @return string |
||
69 | */ |
||
70 | protected static function encode($array) |
||
74 | |||
75 | /** |
||
76 | * @param $string |
||
77 | * @return array |
||
78 | */ |
||
79 | protected static function decode($string) |
||
83 | |||
84 | } |