@@ -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 |
@@ -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"; |