10
0
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-11-09 07:33:49 +01:00
QuantumPackage/ocaml/To_md5.ml

12 lines
219 B
OCaml
Raw Normal View History

2019-01-25 11:39:31 +01:00
open Qptypes
open Sexplib
let to_md5 sexp_of_t t =
sexp_of_t t
|> Sexp.to_string
|> Cryptokit.hash_string (Cryptokit.Hash.md5 ())
|> Cryptokit.transform_string (Cryptokit.Hexa.encode ())
|> MD5.of_string
;;