1 | <?php |
||
19 | * |
||
20 | * @see https://tools.ietf.org/html/rfc5649#section-6 |
||
21 | */ |
||
22 | final class RFC5649Test extends TestCase |
||
23 | { |
||
24 | public function testWrap20BytesKeyDataWith192BitKEK() |
||
34 | |||
35 | public function testWrap7BytesKeyDataWith192BitKEK() |
||
36 | { |
||
37 | $kek = hex2bin('5840df6e29b02af1ab493b705bf16ea1ae8338f4dcc176a8'); |
||
38 | $key = hex2bin('466f7250617369'); |
||
39 | |||
40 | $wrapped = A192KW::wrap($kek, $key, true); |
||
41 | $this->assertEquals(hex2bin('afbeb0f07dfbf5419200f2ccb50bb24f'), $wrapped); |
||
42 | $unwrapped = A192KW::unwrap($kek, $wrapped, true); |
||
43 | $this->assertEquals($key, $unwrapped); |
||
46 |