| @@ -99,9 +99,9 @@ | ||
| 99 | 99 | $cipherTextStream = Psr7\Utils::streamFor($cipherText); |
| 100 | 100 | switch ($cipherOptions['Cipher']) { |
| 101 | 101 | case 'gcm': |
| 102 | 102 | $cipherOptions['Tag'] = $this->getTagFromCiphertextStream($cipherTextStream, $cipherOptions['TagLength']); |
| 103 | - return new AesGcmDecryptingStream($this->getStrippedCiphertextStream($cipherTextStream, $cipherOptions['TagLength']), $cek, $cipherOptions['Iv'], $cipherOptions['Tag'], $cipherOptions['Aad'] = isset($cipherOptions['Aad']) ? $cipherOptions['Aad'] : null, $cipherOptions['TagLength'] ?: null, $cipherOptions['KeySize']); | |
| 103 | + return new AesGcmDecryptingStream($this->getStrippedCiphertextStream($cipherTextStream, $cipherOptions['TagLength']), $cek, $cipherOptions['Iv'], $cipherOptions['Tag'], $cipherOptions['Aad'] = isset($cipherOptions['Aad']) ? $cipherOptions['Aad'] : '', $cipherOptions['TagLength'] ?: null, $cipherOptions['KeySize']); | |
| 104 | 104 | default: |
| 105 | 105 | $cipherMethod = $this->buildCipherMethod($cipherOptions['Cipher'], $cipherOptions['Iv'], $cipherOptions['KeySize']); |
| 106 | 106 | return new AesDecryptingStream($cipherTextStream, $cek, $cipherMethod); |
| 107 | 107 | } |