| Conditions | 1 |
| Paths | 1 |
| Total Lines | 8 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 3 |
| CRAP Score | 1 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 23 | public function __construct($key, $iv) |
||
| 24 | 2 | { |
|
| 25 | $this->key = $key; |
||
| 26 | 2 | $this->iv = $iv; |
|
|
|
|||
| 27 | // initialize cypher with strongest mode and with AES. Is an anti-pattern and should be passed through the |
||
| 28 | // constructor as an argument, but this way we ensure the library does have the strongest strategy by default. |
||
| 29 | 2 | $this->strategy = new AES('cbc'); |
|
| 30 | $this->strategy->setKeyLength(256); |
||
| 31 | 2 | } |
|
| 55 |