1 | <?php |
||
34 | class Encryptor extends BaseEncryptor |
||
35 | { |
||
36 | /** |
||
37 | * {@inheritdoc}. |
||
38 | */ |
||
39 | protected $aesKeyLength = 24; |
||
40 | |||
41 | /** |
||
42 | * A non-NULL Initialization Vector. |
||
43 | * |
||
44 | * @var string |
||
45 | */ |
||
46 | protected $iv; |
||
47 | |||
48 | /** |
||
49 | * Encryptor constructor. |
||
50 | * |
||
51 | * @param string $sessionKey |
||
52 | * @param string $iv |
||
53 | */ |
||
54 | public function __construct($sessionKey, $iv) |
||
60 | |||
61 | /** |
||
62 | * Decrypt data. |
||
63 | * |
||
64 | * @param $encrypted |
||
65 | * |
||
66 | * @return string |
||
67 | */ |
||
68 | public function decryptData($encrypted) |
||
72 | |||
73 | /** |
||
74 | * Decrypt data. |
||
75 | * |
||
76 | * @param string $encrypted |
||
77 | * |
||
78 | * @return Collection |
||
79 | * |
||
80 | * @throws EncryptionException |
||
81 | */ |
||
82 | private function decrypt($encrypted) |
||
99 | } |
||
100 |
Overwriting private methods is generally fine as long as you also use private visibility. It might still be preferable for understandability to use a different method name.