1 | <?php |
||
10 | trait CryptTrait |
||
11 | { |
||
12 | private $cipher; |
||
13 | |||
14 | /** |
||
15 | * Set the key. |
||
16 | * |
||
17 | * @param string $key |
||
18 | * |
||
19 | * @return self |
||
20 | */ |
||
21 | public function key($key) |
||
28 | |||
29 | /** |
||
30 | * Encrypt the given value. |
||
31 | * |
||
32 | * @param string $value |
||
33 | * |
||
34 | * @return string |
||
35 | */ |
||
36 | private function encrypt($value) |
||
44 | |||
45 | /** |
||
46 | * Decrypt the given value. |
||
47 | * |
||
48 | * @param string $value |
||
49 | * |
||
50 | * @return string |
||
51 | */ |
||
52 | private function decrypt($value) |
||
60 | } |
||
61 |