1 | <?php |
||
15 | class OpenSslStrategy extends AesEncryptionStrategy |
||
16 | { |
||
17 | /** |
||
18 | * Create an initialization vector |
||
19 | * |
||
20 | * @return string |
||
21 | */ |
||
22 | public function createIv() |
||
26 | |||
27 | /** |
||
28 | * Get the size of the IV |
||
29 | * |
||
30 | * @return int |
||
31 | */ |
||
32 | public function getIvSize() |
||
36 | |||
37 | /** |
||
38 | * Encrypt data |
||
39 | * |
||
40 | * @param mixed $data |
||
41 | * @param string $iv |
||
42 | * @return mixed |
||
43 | */ |
||
44 | public function encryptData($data, $iv) |
||
48 | |||
49 | /** |
||
50 | * Decrypt data |
||
51 | * |
||
52 | * @param $data |
||
53 | * @param $iv |
||
54 | * @return mixed |
||
55 | */ |
||
56 | public function decryptData($data, $iv) |
||
60 | |||
61 | /** |
||
62 | * Get the openssl formatted encryption method |
||
63 | * |
||
64 | * @return string |
||
65 | */ |
||
66 | private function getEncryptionMethod() |
||
72 | } |
||
73 |