Crypto: add docstrings
This commit is contained in:
parent
c7c8d64557
commit
fd4f435e2e
@ -89,6 +89,7 @@ val register_encoding:
|
|||||||
wrap: ('a -> data) ->
|
wrap: ('a -> data) ->
|
||||||
'a encoding
|
'a encoding
|
||||||
|
|
||||||
|
(** Checks that an encoding has a certain prefix and length. *)
|
||||||
val check_encoded_prefix: 'a encoding -> string -> int -> unit
|
val check_encoded_prefix: 'a encoding -> string -> int -> unit
|
||||||
|
|
||||||
module Alphabet : sig
|
module Alphabet : sig
|
||||||
|
@ -117,6 +117,10 @@ module Make_minimal (K : Name) = struct
|
|||||||
Blake2b.final state
|
Blake2b.final state
|
||||||
|
|
||||||
let path_length = 6
|
let path_length = 6
|
||||||
|
|
||||||
|
(** Converts [key] to hex thus doubling its size then splits it into a list of
|
||||||
|
length [path_length] where each element is one byte, or two characters,
|
||||||
|
except the last one which contains the rest. *)
|
||||||
let to_path key l =
|
let to_path key l =
|
||||||
let `Hex key = to_hex key in
|
let `Hex key = to_hex key in
|
||||||
String.sub key 0 2 :: String.sub key 2 2 ::
|
String.sub key 0 2 :: String.sub key 2 2 ::
|
||||||
|
Loading…
Reference in New Issue
Block a user