@@ -4,7 +4,6 @@ |
||
4 | 4 | |
5 | 5 | use BitWasp\Buffertools\Buffer; |
6 | 6 | use BitWasp\Buffertools\BufferInterface; |
7 | -use Btccom\JustEncrypt\HeaderBlob; |
|
8 | 7 | use Btccom\JustEncrypt\KeyDerivation; |
9 | 8 | |
10 | 9 | class KeyDerivationTest extends AbstractTestCase |
@@ -14,7 +14,7 @@ |
||
14 | 14 | */ |
15 | 15 | public function getKeyDerivationVectors() |
16 | 16 | { |
17 | - return array_map(function (array $row) { |
|
17 | + return array_map(function(array $row) { |
|
18 | 18 | if (isset($row['password_utf8'])) { |
19 | 19 | $password = new Buffer($row['password_utf8']); |
20 | 20 | } else { |
@@ -13,7 +13,7 @@ |
||
13 | 13 | */ |
14 | 14 | public function getEncryptionVectors() |
15 | 15 | { |
16 | - return array_map(function (array $row) { |
|
16 | + return array_map(function(array $row) { |
|
17 | 17 | return [Buffer::hex($row['password']), Buffer::hex($row['salt']), $row['iterations'], Buffer::hex($row['iv']), Buffer::hex($row['pt']), Buffer::hex($row['ct']), Buffer::hex($row['tag']), Buffer::hex($row['full'])]; |
18 | 18 | }, $this->getTestVectors()['encryption']); |
19 | 19 | } |
@@ -26,7 +26,7 @@ |
||
26 | 26 | */ |
27 | 27 | private function readTestVectorsFile() |
28 | 28 | { |
29 | - $decoded = json_decode(file_get_contents(__DIR__ .'/data/crypt_vectors.json'), true); |
|
29 | + $decoded = json_decode(file_get_contents(__DIR__ . '/data/crypt_vectors.json'), true); |
|
30 | 30 | if (!$decoded || json_last_error() !== JSON_ERROR_NONE) { |
31 | 31 | throw new \RuntimeException('failed to read vectors file'); |
32 | 32 | } |
@@ -13,7 +13,7 @@ |
||
13 | 13 | */ |
14 | 14 | public function getConsistencyCheckVectors() |
15 | 15 | { |
16 | - return array_map(function (array $row) { |
|
16 | + return array_map(function(array $row) { |
|
17 | 17 | return [Buffer::hex($row['data']), $row['mnemonic']]; |
18 | 18 | }, $this->getTestVectors()['mnemonic']); |
19 | 19 | } |