@@ -16,7 +16,7 @@ |
||
16 | 16 | $key = '012345678901234567890123'; |
17 | 17 | // read ciphertext, authentication tag and initialization vector from the stdin |
18 | 18 | [$ciphertext, $auth_tag, $iv] = array_map('hex2bin', |
19 | - file('php://stdin', FILE_IGNORE_NEW_LINES)); |
|
19 | + file('php://stdin', FILE_IGNORE_NEW_LINES)); |
|
20 | 20 | // configure GCM object with AES-192 cipher and 13-bytes long authentication tag |
21 | 21 | $gcm = new GCM(new AES192Cipher(), 13); |
22 | 22 | // decrypt and authenticate |
@@ -5,7 +5,7 @@ |
||
5 | 5 | * php explicit-encrypt.php | php explicit-decrypt.php |
6 | 6 | */ |
7 | 7 | |
8 | -declare(strict_types = 1); |
|
8 | +declare(strict_types=1); |
|
9 | 9 | |
10 | 10 | use Sop\GCM\Cipher\AES\AES192Cipher; |
11 | 11 | use Sop\GCM\GCM; |
@@ -5,7 +5,7 @@ |
||
5 | 5 | * php encrypt.php |
6 | 6 | */ |
7 | 7 | |
8 | -declare(strict_types = 1); |
|
8 | +declare(strict_types=1); |
|
9 | 9 | |
10 | 10 | use Sop\GCM\AESGCM; |
11 | 11 |
@@ -6,7 +6,7 @@ |
||
6 | 6 | * php explicit-encrypt.php |
7 | 7 | */ |
8 | 8 | |
9 | -declare(strict_types = 1); |
|
9 | +declare(strict_types=1); |
|
10 | 10 | |
11 | 11 | use Sop\GCM\Cipher\AES\AES192Cipher; |
12 | 12 | use Sop\GCM\GCM; |
@@ -18,7 +18,7 @@ |
||
18 | 18 | $key = 'some 128 bit key'; |
19 | 19 | // read ciphertext, authentication tag and initialization vector from the stdin |
20 | 20 | [$ciphertext, $auth_tag, $iv] = array_map('hex2bin', |
21 | - file('php://stdin', FILE_IGNORE_NEW_LINES)); |
|
21 | + file('php://stdin', FILE_IGNORE_NEW_LINES)); |
|
22 | 22 | // decrypt and authenticate |
23 | 23 | $plaintext = AESGCM::decrypt($ciphertext, $auth_tag, $aad, $key, $iv); |
24 | 24 | echo "${plaintext}\n"; |
@@ -5,7 +5,7 @@ |
||
5 | 5 | * php encrypt.php | php decrypt.php |
6 | 6 | */ |
7 | 7 | |
8 | -declare(strict_types = 1); |
|
8 | +declare(strict_types=1); |
|
9 | 9 | |
10 | 10 | use Sop\GCM\AESGCM; |
11 | 11 |