Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yocaml_unix: use digestif for SHA256 computation instead of cryptokit #50

Merged
merged 2 commits into from
Feb 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading