Module DigestifSource

Sourcetype 'a iter = ('a -> unit) -> unit

A general (inner) iterator. It applies the provided function to a collection of elements. For instance:

  • let iter_k : 'a -> 'a iter = fun x f -> f x
  • let iter_pair : 'a * 'a -> 'a iter = fun (x, y) -> f x; f y
  • let iter_list : 'a list -> 'a iter = fun l f -> List.iter f l
Sourcetype 'a compare = 'a -> 'a -> int
Sourcetype 'a equal = 'a -> 'a -> bool
Sourcetype 'a pp = Format.formatter -> 'a -> unit
Sourcemodule type S = sig ... end
Sourcemodule type MAC = sig ... end

Some hash algorithms expose extra MAC constructs. The interface is similar to the hmac_* functions in S.

Sourcemodule MD5 : S
Sourcemodule SHA1 : S
Sourcemodule SHA224 : S
Sourcemodule SHA256 : S
Sourcemodule SHA384 : S
Sourcemodule SHA512 : S
Sourcemodule SHA3_224 : S

SHA3 224 hash algorithm.

Sourcemodule SHA3_256 : S

SHA3 256 hash algorithm.

KECCAK 256 hash algorithm.

Sourcemodule SHA3_384 : S

SHA3 384 hash algorithm.

Sourcemodule SHA3_512 : S

SHA3 512 hash algorithm.

WHIRLPOOL hash algorithm.

Sourcemodule BLAKE2B : sig ... end
Sourcemodule BLAKE2S : sig ... end
Sourcemodule RMD160 : S

RMD160 hash algorithm.

Sourcemodule Make_BLAKE2B (D : sig ... end) : S
Sourcemodule Make_BLAKE2S (D : sig ... end) : S
Sourcetype 'k hash =
  1. | MD5 : MD5.t hash
  2. | SHA1 : SHA1.t hash
  3. | RMD160 : RMD160.t hash
  4. | SHA224 : SHA224.t hash
  5. | SHA256 : SHA256.t hash
  6. | SHA384 : SHA384.t hash
  7. | SHA512 : SHA512.t hash
  8. | SHA3_224 : SHA3_224.t hash
  9. | SHA3_256 : SHA3_256.t hash
  10. | KECCAK_256 : KECCAK_256.t hash
  11. | SHA3_384 : SHA3_384.t hash
  12. | SHA3_512 : SHA3_512.t hash
  13. | WHIRLPOOL : WHIRLPOOL.t hash
  14. | BLAKE2B : BLAKE2B.t hash
  15. | BLAKE2S : BLAKE2S.t hash
Sourcetype hash' = [
  1. | `MD5
  2. | `SHA1
  3. | `RMD160
  4. | `SHA224
  5. | `SHA256
  6. | `SHA384
  7. | `SHA512
  8. | `SHA3_224
  9. | `SHA3_256
  10. | `KECCAK_256
  11. | `SHA3_384
  12. | `SHA3_512
  13. | `WHIRLPOOL
  14. | `BLAKE2B
  15. | `BLAKE2S
]
Sourceval module_of_hash' : hash' -> (module S)
Sourceval hash_to_hash' : _ hash -> hash'
Sourceval md5 : MD5.t hash
Sourceval sha1 : SHA1.t hash
Sourceval rmd160 : RMD160.t hash
Sourceval sha224 : SHA224.t hash
Sourceval sha256 : SHA256.t hash
Sourceval sha384 : SHA384.t hash
Sourceval sha512 : SHA512.t hash
Sourceval sha3_224 : SHA3_224.t hash
Sourceval sha3_256 : SHA3_256.t hash
Sourceval keccak_256 : KECCAK_256.t hash
Sourceval sha3_384 : SHA3_384.t hash
Sourceval sha3_512 : SHA3_512.t hash
Sourceval whirlpool : WHIRLPOOL.t hash
Sourceval blake2b : BLAKE2B.t hash
Sourceval blake2s : BLAKE2S.t hash
Sourcetype 'kind t
Sourceval module_of : 'k hash -> (module S with type t = 'k)
Sourceval digest_bytes : 'k hash -> Bytes.t -> 'k t
Sourceval digest_string : 'k hash -> String.t -> 'k t
Sourceval digest_bigstring : 'k hash -> bigstring -> 'k t
Sourceval digesti_bytes : 'k hash -> Bytes.t iter -> 'k t
Sourceval digesti_string : 'k hash -> String.t iter -> 'k t
Sourceval digesti_bigstring : 'k hash -> bigstring iter -> 'k t
Sourceval hmaci_bytes : 'k hash -> key:string -> Bytes.t iter -> 'k t
Sourceval hmaci_string : 'k hash -> key:string -> String.t iter -> 'k t
Sourceval hmaci_bigstring : 'k hash -> key:string -> bigstring iter -> 'k t
Sourceval pp : 'k hash -> 'k t pp
Sourceval equal : 'k hash -> 'k t equal
Sourceval unsafe_compare : 'k hash -> 'k t compare
Sourceval to_hex : 'k hash -> 'k t -> string
Sourceval of_hex : 'k hash -> string -> 'k t
Sourceval of_hex_opt : 'k hash -> string -> 'k t option
Sourceval consistent_of_hex : 'k hash -> string -> 'k t
Sourceval consistent_of_hex_opt : 'k hash -> string -> 'k t option
Sourceval of_raw_string : 'k hash -> string -> 'k t
Sourceval of_raw_string_opt : 'k hash -> string -> 'k t option
Sourceval to_raw_string : 'k hash -> 'k t -> string
Sourceval of_digest : (module S with type t = 'hash) -> 'hash -> 'hash t
Sourceval of_md5 : MD5.t -> MD5.t t
Sourceval of_sha1 : SHA1.t -> SHA1.t t
Sourceval of_rmd160 : RMD160.t -> RMD160.t t
  • since 0.4
Sourceval of_sha224 : SHA224.t -> SHA224.t t
Sourceval of_sha256 : SHA256.t -> SHA256.t t
Sourceval of_sha384 : SHA384.t -> SHA384.t t
Sourceval of_sha512 : SHA512.t -> SHA512.t t
Sourceval of_sha3_224 : SHA3_224.t -> SHA3_224.t t
  • since 0.9.0
Sourceval of_sha3_256 : SHA3_256.t -> SHA3_256.t t
  • since 0.9.0
Sourceval of_keccak_256 : KECCAK_256.t -> KECCAK_256.t t
  • since 1.1.0
Sourceval of_sha3_384 : SHA3_384.t -> SHA3_384.t t
  • since 0.9.0
Sourceval of_sha3_512 : SHA3_512.t -> SHA3_512.t t
  • since 0.9.0
Sourceval of_whirlpool : WHIRLPOOL.t -> WHIRLPOOL.t t
  • since 0.7.1
Sourceval of_blake2b : BLAKE2B.t -> BLAKE2B.t t
Sourceval of_blake2s : BLAKE2S.t -> BLAKE2S.t t