Conditions | 2 |
Paths | 2 |
Total Lines | 17 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Tests | 14 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
43 | 6 | public function encrypt() |
|
44 | { |
||
45 | 6 | if ($this->flag) { |
|
46 | 6 | $this->plainText = $this->data; |
|
47 | } |
||
48 | 6 | $this->cipherText = openssl_encrypt( |
|
49 | 6 | $this->plainText, |
|
50 | 6 | $this->cipher, |
|
51 | 6 | $this->key, |
|
52 | 6 | $this->options, |
|
53 | 6 | $this->iv, |
|
54 | 6 | $this->tag, |
|
55 | 6 | $this->aad, |
|
56 | 6 | $this->tagLength |
|
57 | ); |
||
58 | 6 | $this->flag = 0; |
|
59 | 6 | return $this; |
|
60 | } |
||
80 |