This commit is contained in:
parent
b8e361c825
commit
efb6c66f6f
2 changed files with 2 additions and 12 deletions
|
|
@ -114,10 +114,8 @@ module EddsaPublicKey = struct
|
||||||
| Ok v -> Ok v
|
| Ok v -> Ok v
|
||||||
|
|
||||||
let bin =
|
let bin =
|
||||||
let of_octets o =
|
let of_octets_exn t = of_octets t |> Result.get_ok in
|
||||||
match of_octets o with Error e -> raise (Util.Bin_error e) | Ok v -> v
|
Bin.map (Bin.bytes 32) of_octets_exn to_octets
|
||||||
in
|
|
||||||
Bin.map (Bin.bytes 32) of_octets to_octets
|
|
||||||
|
|
||||||
let of_b32 s =
|
let of_b32 s =
|
||||||
let* octets = B32.decode s in
|
let* octets = B32.decode s in
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,3 @@
|
||||||
exception Bin_error of string
|
|
||||||
|
|
||||||
(* TODO bin
|
|
||||||
- no [Bin.of_string] ? *)
|
|
||||||
let bin_of_string bin s =
|
|
||||||
let v = Bin.decode bin s (ref 0) in
|
|
||||||
Ok v
|
|
||||||
|
|
||||||
module Log_reporter = struct
|
module Log_reporter = struct
|
||||||
let detail_tag : string Logs.Tag.def =
|
let detail_tag : string Logs.Tag.def =
|
||||||
Logs.Tag.def "Detail tag" ~doc:"" Fmt.string
|
Logs.Tag.def "Detail tag" ~doc:"" Fmt.string
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue