diff --git a/CHANGES.md b/CHANGES.md index d2bca57..402df7f 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,8 @@ +### dev (unreleased) + +#### yocaml_unix +- Use digestif instead of cryptokit (#50 @hannesm, review by @xvw) + ### v1.0.0 2023-11-15 Paris (France) - First release of YOCaml diff --git a/lib/yocaml_unix/dune b/lib/yocaml_unix/dune index b08caaf..5197dbc 100644 --- a/lib/yocaml_unix/dune +++ b/lib/yocaml_unix/dune @@ -1,7 +1,7 @@ (library (name yocaml_unix) (public_name yocaml_unix) - (libraries cryptokit unix yocaml logs cohttp-lwt-unix conduit-lwt)) + (libraries digestif unix yocaml logs cohttp-lwt-unix conduit-lwt)) (documentation (package yocaml_unix)) diff --git a/lib/yocaml_unix/runtime.ml b/lib/yocaml_unix/runtime.ml index 0765f2a..b883afb 100644 --- a/lib/yocaml_unix/runtime.ml +++ b/lib/yocaml_unix/runtime.ml @@ -78,8 +78,7 @@ let read_dir path = ;; let hash value = - let open Cryptokit in - value |> hash_string (Hash.sha256 ()) |> transform_string (Hexa.encode ()) + Digestif.SHA256.(digest_string value |> to_hex) ;; let content_changes path new_content = diff --git a/yocaml_unix.opam b/yocaml_unix.opam index 2d64bc4..28efde7 100644 --- a/yocaml_unix.opam +++ b/yocaml_unix.opam @@ -25,7 +25,7 @@ depends: [ "dune" { >= "2.8" } "odoc" {with-doc} "preface" { >= "1.0.0" } - "cryptokit" { >= "1.16.1" } + "digestif" "logs" {>= "0.7.0" } "conduit-lwt" { >= "4.0.0" } "cohttp-lwt-unix" { >= "4.0.0" }