HMAC-based Extract-and-Expand Key Derivation Function (RFC 5869)
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

hkdf: rename test_ functions in interop test (merlint E330)

+6 -6
+6 -6
test/interop/cryptography/test.ml
··· 64 64 65 65 (* {1 Tests} *) 66 66 67 - let test_extract vectors () = 67 + let extract vectors () = 68 68 List.iter 69 69 (fun (v : vector) -> 70 70 let hash = hash_of_string v.hash in ··· 74 74 Alcotest.(check string) (v.name ^ ": PRK") v.prk_hex (bytes_to_hex prk)) 75 75 vectors 76 76 77 - let test_expand vectors () = 77 + let expand vectors () = 78 78 List.iter 79 79 (fun (v : vector) -> 80 80 let hash = hash_of_string v.hash in ··· 84 84 Alcotest.(check string) (v.name ^ ": OKM") v.okm_hex (bytes_to_hex okm)) 85 85 vectors 86 86 87 - let test_derive vectors () = 87 + let derive vectors () = 88 88 List.iter 89 89 (fun (v : vector) -> 90 90 let hash = hash_of_string v.hash in ··· 102 102 ( "extract", 103 103 [ 104 104 Alcotest.test_case "extract matches reference PRK" `Quick 105 - (test_extract vectors); 105 + (extract vectors); 106 106 ] ); 107 107 ( "expand", 108 108 [ 109 109 Alcotest.test_case "expand matches reference OKM" `Quick 110 - (test_expand vectors); 110 + (expand vectors); 111 111 ] ); 112 112 ( "derive", 113 113 [ 114 114 Alcotest.test_case "derive matches reference OKM" `Quick 115 - (test_derive vectors); 115 + (derive vectors); 116 116 ] ); 117 117 ]