Skip to content

Commit

Permalink
Merge pull request #9 from Spomky-Labs/master
Browse files Browse the repository at this point in the history
Sync with master branch
  • Loading branch information
Spomky authored Nov 7, 2018
2 parents b655bef + afcaedf commit e3900f2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Help me out for a couple of :beers:!
[![Latest Stable Version](https://poser.pugx.org/Spomky-Labs/php-aes-gcm/v/stable.png)](https://packagist.org/packages/Spomky-Labs/php-aes-gcm)
[![Total Downloads](https://poser.pugx.org/Spomky-Labs/php-aes-gcm/downloads.png)](https://packagist.org/packages/Spomky-Labs/php-aes-gcm)
[![Latest Unstable Version](https://poser.pugx.org/Spomky-Labs/php-aes-gcm/v/unstable.png)](https://packagist.org/packages/Spomky-Labs/php-aes-gcm)
[![License](https://poser.pugx.org/Spomky-Labs/php-aes-gcm/license.png)](https://packagist.org/packages/Spomky-Labs/php-aes-gcm)
[![License](https://poser.pugx.org/Spomky-Labs/php-aes-gcm/license.png)](https://packagist.org/packages/Spomky-Labs/php-aes-gcm) [![GuardRails badge](https://badges.production.guardrails.io/Spomky-Labs/php-aes-gcm.svg)](https://www.guardrails.io)


# The Release Process
Expand Down
2 changes: 1 addition & 1 deletion src/AESGCM.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ public static function decryptWithAppendedTag($K, $IV, $Ciphertext = null, $A =
private static function decryptWithPHP71($K, $key_length, $IV, $C, $A, $T)
{
$mode = 'aes-'.($key_length).'-gcm';
$P = openssl_decrypt(null === $C ? '' : $C, $mode, $K, OPENSSL_RAW_DATA, $IV, $T, $A);
$P = openssl_decrypt(null === $C ? '' : $C, $mode, $K, OPENSSL_RAW_DATA, $IV, $T, null === $A ? '' : $A);
Assertion::true(false !== $P, 'Unable to decrypt or to verify the tag.');

return $P;
Expand Down

0 comments on commit e3900f2

Please sign in to comment.