From b790c77c5e42a220a8419c69dbea3e392ee60fbe Mon Sep 17 00:00:00 2001 From: Marcos Magueta Date: Sun, 2 Aug 2026 23:38:05 -0300 Subject: Revert "format" This reverts commit fee14f4b29840357f87f02d51953f41ce90f7d9e. --- lib/concepts/Hash.ml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'lib/concepts/Hash.ml') diff --git a/lib/concepts/Hash.ml b/lib/concepts/Hash.ml index a84c60d..aac7428 100644 --- a/lib/concepts/Hash.ml +++ b/lib/concepts/Hash.ml @@ -2,16 +2,22 @@ type hash = Digestif.SHA256.t -let size = 256 / 8 -let compare h1 h2 = Digestif.SHA256.unsafe_compare h1 h2 |> Ordering.of_int +let size = 256/8 + +let compare h1 h2 = Digestif.SHA256.unsafe_compare h1 h2 + |> Ordering.of_int let hash_of_value (v : Value.value) = Representation.(blob_of_value v |> bytes_of_blob) |> Digestif.SHA256.digest_bytes let hash_of_bytes bytes = Digestif.SHA256.digest_bytes bytes + let hash_of_blob blob = Representation.bytes_of_blob blob |> Digestif.SHA256.digest_bytes + let to_raw_string hash = Digestif.SHA256.to_raw_string hash + let of_raw_string str = Digestif.SHA256.of_raw_string str + let hash_equals = Digestif.SHA256.equal let bytes_of_hash (h : hash) = Bytes.of_string (Digestif.SHA256.to_raw_string h) -- cgit v1.2.3