tezos-crypto

Tezos: library with all the cryptographic primitives used by Tezos
IN THIS PACKAGE
Module Tezos_crypto . Hacl . Hash . SHA512
include DIRECT_HASH
val size : int

size of the digest

val digest : Bytes.t -> 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 -> Bytes.t -> unit

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

val finish : state -> 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