Module type B0_hash.TSource

The type for hash functions.

Hash function

Sourceval id : string

id is an US-ASCII string identifying the hash function.

Sourceval length : int

length is the byte length of hashes produced by the function.

Sourceval string : string -> t

string s is the hash of s.

Sourceval fd : Unix.file_descr -> t

fd fd mmap(2)s and hashes the object pointed by fd.

  • raises Sys_error

    if mmap fails.

Sourceval file : B0_std.Fpath.t -> (t, string) Stdlib.result

file f is the hash of file f.