upstream: github.com/robur-coop/kdf
0
fork

Configure Feed

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

fix(lint): resolve E410 doc style issues, E400/E405/E600 across kdf, monopam, ocaml-agent, ocaml-aos

E410: Fix documentation style in 14 .mli files — add [name args] format,
correct function names (create→v, scrypt_kdf→scrypt), fix arg counts
for tuple params and pp functions, add trailing periods.

E400/E600: Add per-module log sources (ca-certs), restructure kdf and
monopam tests to use suite convention with proper .mli files, add
missing .mli files for monopam command modules.

+27 -28
+4 -4
hkdf/hkdf.mli
··· 19 19 module Make (H : Digestif.S) : S 20 20 21 21 val extract : hash:Digestif.hash' -> ?salt:string -> string -> string 22 - (** convenience [extract hash salt ikm] where the [hash] has to be provided 23 - explicitly *) 22 + (** [extract ~hash ?salt ikm] is a convenience wrapper where the [hash] has to 23 + be provided explicitly. *) 24 24 25 25 val expand : hash:Digestif.hash' -> prk:string -> ?info:string -> int -> string 26 - (** convenience [expand hash prk info len] where the [hash] has to be provided 27 - explicitly *) 26 + (** [expand ~hash ~prk ?info len] is a convenience wrapper where the [hash] has 27 + to be provided explicitly. *)
+1 -3
hkdf/tests/dune
··· 1 1 (test 2 - (name test_hkdf) 3 - (modules test_hkdf) 4 - (modes native) 2 + (name test) 5 3 (libraries alcotest kdf.hkdf ohex))
+1
hkdf/tests/test.ml
··· 1 + let () = Alcotest.run "HKDF" [ Test_hkdf.suite ]
+1 -1
hkdf/tests/test_hkdf.ml
··· 111 111 ("RFC 5869 Test Case 7", `Quick, test7); 112 112 ] 113 113 114 - let () = Alcotest.run "HKDF Tests" [ ("RFC 5869", tests) ] 114 + let suite = ("hkdf", tests)
+2
hkdf/tests/test_hkdf.mli
··· 1 + val suite : string * unit Alcotest.test_case list 2 + (** Test suite. *)
+4 -4
pbkdf/pbkdf.mli
··· 27 27 count:int -> 28 28 dk_len:int -> 29 29 string 30 - (** convenience [pbkdf1 hash password salt count dk_len] where the [hash] has to 31 - be provided explicitly *) 30 + (** [pbkdf1 ~hash ~password ~salt ~count ~dk_len] is a convenience wrapper where 31 + the [hash] has to be provided explicitly. *) 32 32 33 33 val pbkdf2 : 34 34 prf:Digestif.hash' -> ··· 37 37 count:int -> 38 38 dk_len:int32 -> 39 39 string 40 - (** convenience [pbkdf2 prf password salt count dk_len] where the [prf] has to 41 - be provided explicitly *) 40 + (** [pbkdf2 ~prf ~password ~salt ~count ~dk_len] is a convenience wrapper where 41 + the [prf] has to be provided explicitly. *)
+1 -2
pbkdf/test/dune
··· 1 1 (test 2 - (name test_pbkdf) 3 - (modes native) 2 + (name test) 4 3 (libraries ohex kdf.pbkdf alcotest))
+1
pbkdf/test/test.ml
··· 1 + let () = Alcotest.run "PBKDF" [ Test_pbkdf.suite ]
+1 -5
pbkdf/test/test_pbkdf.ml
··· 1 - let () = Printexc.record_backtrace true 2 - 3 1 (* PBKDF1 *) 4 2 let test_pbkdf1 ~hash ~password ~salt ~count ~dk_len ~dk = 5 3 let salt = Ohex.decode salt and dk = Ohex.decode dk in ··· 182 180 ("Test Case 17", `Quick, pbkdf2_test17); 183 181 ] 184 182 185 - let () = 186 - Alcotest.run "PBKDF Tests" 187 - [ ("PBKDF1 tests", pbkdf1_tests); ("PBKDF2 tests", pbkdf2_tests) ] 183 + let suite = ("pbkdf", pbkdf1_tests @ pbkdf2_tests)
+2
pbkdf/test/test_pbkdf.mli
··· 1 + val suite : string * unit Alcotest.test_case list 2 + (** Test suite. *)
+4 -4
scrypt/scrypt.mli
··· 12 12 p:int -> 13 13 dk_len:int32 -> 14 14 string 15 - (** [scrypt_kdf password salt n r p dk_len] is [dk], the derived key of [dk_len] 16 - octets. [n], the cost parameter, must be larger than 1 and a power of 2. 17 - [p], the parallelization parameter, must be a possitive integer and less 18 - than or equal to 2^32 - 1 / (4 * r) 15 + (** [scrypt ~password ~salt ~n ~r ~p ~dk_len] is [dk], the derived key of 16 + [dk_len] octets. [n], the cost parameter, must be larger than 1 and a power 17 + of 2. [p], the parallelization parameter, must be a possitive integer and 18 + less than or equal to 2^32 - 1 / (4 * r) 19 19 @raise Invalid_argument when either [n], [p] or [dk_len] are not valid *)
+1 -3
scrypt/tests/dune
··· 1 1 (test 2 - (name test_scrypt) 3 - (modules test_scrypt) 4 - (modes native) 2 + (name test) 5 3 (libraries kdf.scrypt ohex alcotest))
+1
scrypt/tests/test.ml
··· 1 + let () = Alcotest.run "scrypt" [ Test_scrypt.suite ]
+1 -2
scrypt/tests/test_scrypt.ml
··· 43 43 ("Test Case 4", `Slow, scrypt_kdf_test4); 44 44 ] 45 45 46 - let () = 47 - Alcotest.run "Scrypt kdf Tests" [ ("Scrypt kdf tests", scrypt_kdf_tests ()) ] 46 + let suite = ("scrypt", scrypt_kdf_tests ())
+2
scrypt/tests/test_scrypt.mli
··· 1 + val suite : string * unit Alcotest.test_case list 2 + (** Test suite. *)