| @@ -41,9 +41,9 @@ | ||
| 41 | 41 | public function encrypt($data) | 
| 42 | 42 |      { | 
| 43 | 43 |          if ($this->iv) { | 
| 44 | - $iv = $this->iv; | |
| 44 | + $iv = $this->iv; | |
| 45 | 45 |          } else { | 
| 46 | - $iv = base64_encode(random_bytes(openssl_cipher_iv_length($this->cipher))); | |
| 46 | + $iv = base64_encode(random_bytes(openssl_cipher_iv_length($this->cipher))); | |
| 47 | 47 | } | 
| 48 | 48 | |
| 49 | 49 | $encrypted = openssl_encrypt($data, $this->cipher, base64_decode($this->key), 0, base64_decode($iv)); |