Skip to content

Commit

Permalink
Merge pull request #50 from hannesm/use-digestif-no-cryptokit
Browse files Browse the repository at this point in the history
yocaml_unix: use digestif for SHA256 computation instead of cryptokit
  • Loading branch information
xvw authored Feb 15, 2024
2 parents b52756b + d36972c commit 6525183
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -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
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 6525183

Please sign in to comment.