tests/OpenSSLCryptoTest.php 1 location
|
@@ 20-24 (lines=5) @@
|
17 |
|
|
18 |
|
$handler = new OpenSSLCrypto($key, $salt); |
19 |
|
|
20 |
|
for ($i = 0; $i < 1000; ++$i) { |
21 |
|
$data = random_bytes(1024 * 4); |
22 |
|
|
23 |
|
$this->assertEquals($data, $handler->decrypt($handler->encrypt($data))); |
24 |
|
} |
25 |
|
} |
26 |
|
} |
27 |
|
|
tests/McryptCryptoTest.php 1 location
|
@@ 29-33 (lines=5) @@
|
26 |
|
|
27 |
|
$handler = new McryptCrypto($key, $salt); |
28 |
|
|
29 |
|
for ($i = 0; $i < 1000; ++$i) { |
30 |
|
$data = random_bytes(1024 * 4); |
31 |
|
|
32 |
|
$this->assertEquals($data, $handler->decrypt($handler->encrypt($data))); |
33 |
|
} |
34 |
|
} finally { |
35 |
|
ini_set('error_reporting', $error_reporting); |
36 |
|
} |