Skip to content

Commit

Permalink
yocaml_unix: use digestif for SHA256 computation instead of cryptokit
Browse files Browse the repository at this point in the history
  • Loading branch information
hannesm committed Feb 13, 2024
1 parent b52756b commit 0122ee2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/yocaml_unix/dune
Original file line number Diff line number Diff line change
@@ -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))
3 changes: 1 addition & 2 deletions lib/yocaml_unix/runtime.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down
2 changes: 1 addition & 1 deletion yocaml_unix.opam
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand Down

0 comments on commit 0122ee2

Please sign in to comment.