Compare commits
2 commits
2c606dbeb4
...
6447339f64
Author | SHA1 | Date | |
---|---|---|---|
6447339f64 | |||
c57b070d87 |
1 changed files with 11 additions and 4 deletions
|
@ -537,10 +537,17 @@ module Make
|
||||||
| Some f ->
|
| Some f ->
|
||||||
read_chunked t `SHA256 path
|
read_chunked t `SHA256 path
|
||||||
(fun (sha256, md5, sha512) data ->
|
(fun (sha256, md5, sha512) data ->
|
||||||
Lwt.return
|
let sha256 = SHA256.feed_string sha256 data in
|
||||||
(SHA256.feed_string sha256 data,
|
Lwt.pause () >>= fun () ->
|
||||||
Option.map (fun t -> MD5.feed_string t data) md5,
|
let md5 =
|
||||||
Option.map (fun t -> SHA512.feed_string t data) sha512))
|
Option.map (fun t -> MD5.feed_string t data) md5
|
||||||
|
in
|
||||||
|
Lwt.pause () >>= fun () ->
|
||||||
|
let sha512 =
|
||||||
|
Option.map (fun t -> SHA512.feed_string t data) sha512
|
||||||
|
in
|
||||||
|
Lwt.pause () >|= fun () ->
|
||||||
|
sha256, md5, sha512)
|
||||||
(SHA256.empty,
|
(SHA256.empty,
|
||||||
Option.map (fun _ -> MD5.empty) md5_final,
|
Option.map (fun _ -> MD5.empty) md5_final,
|
||||||
Option.map (fun _ -> SHA512.empty) sha512_final) >>= function
|
Option.map (fun _ -> SHA512.empty) sha512_final) >>= function
|
||||||
|
|
Loading…
Reference in a new issue