Simple hash algorithms in OCaml
Digestif is a toolbox that implements multiple hash algorithms including MD5, SHA1, SHA2, SHA3, WHIRLPOOL, BLAKE2B, BLAKE2S, and RIPEMD160 in both C and OCaml. The library is built for OCaml and provides a consistent API across all hash functions while allowing users to choose between a faster C implementation or a slower but pure OCaml implementation. It includes security-conscious features like constant-time comparison to protect against timing attacks and is designed to be platform-agnostic, including support for MirageOS and JavaScript compilation via js_of_ocaml. The project was created by Romain Calascibetta and builds upon prior work from the nocrypto library and ocaml-sha.