diff --git a/src/Illuminate/Encryption/Encrypter.php b/src/Illuminate/Encryption/Encrypter.php index 6e5880a29e9f..856e6bae8d39 100755 --- a/src/Illuminate/Encryption/Encrypter.php +++ b/src/Illuminate/Encryption/Encrypter.php @@ -99,17 +99,10 @@ public function encrypt($value, $serialize = true) { $iv = random_bytes(openssl_cipher_iv_length(strtolower($this->cipher))); - $tag = ''; - - $value = self::$supportedCiphers[strtolower($this->cipher)]['aead'] - ? \openssl_encrypt( - $serialize ? serialize($value) : $value, - strtolower($this->cipher), $this->key, 0, $iv, $tag - ) - : \openssl_encrypt( - $serialize ? serialize($value) : $value, - strtolower($this->cipher), $this->key, 0, $iv - ); + $value = \openssl_encrypt( + $serialize ? serialize($value) : $value, + strtolower($this->cipher), $this->key, 0, $iv, $tag + ); if ($value === false) { throw new EncryptException('Could not encrypt the data.');