diff --git a/src/lib_crypto/base58.mli b/src/lib_crypto/base58.mli index 6de3fe615..37b6db9c3 100644 --- a/src/lib_crypto/base58.mli +++ b/src/lib_crypto/base58.mli @@ -89,6 +89,7 @@ val register_encoding: wrap: ('a -> data) -> 'a encoding +(** Checks that an encoding has a certain prefix and length. *) val check_encoded_prefix: 'a encoding -> string -> int -> unit module Alphabet : sig diff --git a/src/lib_crypto/blake2B.ml b/src/lib_crypto/blake2B.ml index f05db53e2..4cf9697cc 100644 --- a/src/lib_crypto/blake2B.ml +++ b/src/lib_crypto/blake2B.ml @@ -117,6 +117,10 @@ module Make_minimal (K : Name) = struct Blake2b.final state 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 `Hex key = to_hex key in String.sub key 0 2 :: String.sub key 2 2 ::