From d3708bb28adcd0220142f1890ab96bfd2df637d3 Mon Sep 17 00:00:00 2001 From: Marcos Magueta Date: Sat, 4 Apr 2026 17:10:32 -0300 Subject: remove interop with c --- lib/conventions.ml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/conventions.ml') diff --git a/lib/conventions.ml b/lib/conventions.ml index b6f82a5..de04712 100644 --- a/lib/conventions.ml +++ b/lib/conventions.ml @@ -1,7 +1,7 @@ module Hash = struct - type t = Interop.Sha256.t + type t = string - let hash_text text = Interop.Sha256.compute_hash (Bytes.of_string text) + let hash_text text = Sha256.to_hex (Sha256.string text) let compare = String.compare let sexp_of_t = Sexplib.Std.sexp_of_string end @@ -25,7 +25,7 @@ end module AbstractValue = struct type t = Obj.t - let hash (elem : t) = Interop.Sha256.compute_hash @@ Marshal.to_bytes elem [] + let hash (elem : t) = Sha256.to_hex (Sha256.string (Bytes.to_string (Marshal.to_bytes elem []))) let sexp_of_t (v : t) = let open Sexplib.Sexp in -- cgit v1.2.3