package tezos-crypto

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
include DIRECT_HASH
val size : int

size of the digest

val digest : Stdlib.Bytes.t -> Stdlib.Bytes.t

digest msg hashes msg to generate a size bytes long digest

include INCREMENTAL_HASH
type state

For hashes that offer an incremental interface, the internal state of the algorithm is kept in an object of type state which is initialised using init and needs to be stored and passed as an argument to the other functions in the interface. It is automatically freed when no longer required.

val init : unit -> state

init () initializes and returns an internal state of the hash algorithm

val update : state -> Stdlib.Bytes.t -> unit

update st msg updates the internal state of the hash algorithm st with buffer msg.

val finish : state -> Stdlib.Bytes.t

finish st generates and returns a digest, without invalidating the state, meaning that further calls to update can be made

module HMAC : sig ... end
OCaml

Innovation. Community. Security.