Hash library similar to rust's?

I’m wondering whether to make a library named hash (the name is, amazingly, available), to provide an abstraction similar to rust’s Hash and Hasher.

I already have the OCaml equivalent, more or less, in ppx_deriving_hash but maybe it really should be split into hash + the ppx. The idea is then that hash can be interfaced with sha, murmur3, digestif, cryptokit, etc. to provide a uniform interface to various hashing functions.

Discussion welcome.

8 Likes