|
@@ 224-229 (lines=6) @@
|
| 221 |
|
$ephemeralPK, |
| 222 |
|
ParagonIE_Sodium_Compat::CRYPTO_BOX_PUBLICKEYBYTES |
| 223 |
|
); |
| 224 |
|
if (!is_int($firstWrite)) { |
| 225 |
|
fclose($ifp); |
| 226 |
|
fclose($ofp); |
| 227 |
|
ParagonIE_Sodium_Compat::memzero($ephKeypair); |
| 228 |
|
throw new Error('Could not write to output file'); |
| 229 |
|
} |
| 230 |
|
if ($firstWrite !== ParagonIE_Sodium_Compat::CRYPTO_BOX_PUBLICKEYBYTES) { |
| 231 |
|
ParagonIE_Sodium_Compat::memzero($ephKeypair); |
| 232 |
|
fclose($ifp); |
|
@@ 230-235 (lines=6) @@
|
| 227 |
|
ParagonIE_Sodium_Compat::memzero($ephKeypair); |
| 228 |
|
throw new Error('Could not write to output file'); |
| 229 |
|
} |
| 230 |
|
if ($firstWrite !== ParagonIE_Sodium_Compat::CRYPTO_BOX_PUBLICKEYBYTES) { |
| 231 |
|
ParagonIE_Sodium_Compat::memzero($ephKeypair); |
| 232 |
|
fclose($ifp); |
| 233 |
|
fclose($ofp); |
| 234 |
|
throw new Error('Error writing public key to output file'); |
| 235 |
|
} |
| 236 |
|
|
| 237 |
|
$res = self::box_encrypt($ifp, $ofp, $size, $nonce, $msgKeypair); |
| 238 |
|
fclose($ifp); |