1 | <?php |
||
26 | |||
27 | $wrapped = A192KW::wrap($kek, $key, true); |
||
28 | static::assertSame(hex2bin('138bdeaa9b8fa7fc61f97742e72248ee5ae6ae5360d1ae6a5f54f373fa543b6a'), $wrapped); |
||
29 | $unwrapped = A192KW::unwrap($kek, $wrapped, true); |
||
30 | static::assertSame($key, $unwrapped); |
||
31 | } |
||
32 | |||
33 | /** |
||
34 | * @test |
||
35 | */ |
||
36 | public function wrap7BytesKeyDataWith192BitKEK(): void |
||
37 | { |
||
38 | $kek = hex2bin('5840df6e29b02af1ab493b705bf16ea1ae8338f4dcc176a8'); |
||
39 | $key = hex2bin('466f7250617369'); |
||
40 | |||
41 | $wrapped = A192KW::wrap($kek, $key, true); |
||
42 | static::assertSame(hex2bin('afbeb0f07dfbf5419200f2ccb50bb24f'), $wrapped); |
||
43 | $unwrapped = A192KW::unwrap($kek, $wrapped, true); |
||
44 | static::assertSame($key, $unwrapped); |
||
45 | } |
||
46 | } |
||
47 |