package plebeia

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

3 Hash

3 Hash

type t

Commit hash identifies commits. It is

Hash of the top Plebeia node hash + the parent commit hash

The size of commit hash is fixed to 32bytes

val to_string : t -> string

Get the 32 bytes binary string representation of t.

val of_string : string -> t

32 bytes binary string representation to t. Fails if the string is inappropriate.

val length : int

= 32

val zero : t

zero returns 32 bytes of zeros

val is_zero : t -> bool
val to_hex_string : t -> string

Convert to 64 chars of hexdigits to t

val of_hex_string : string -> t

Reverse of to_hex_string. Fails if the string is inappropriate.

val show : t -> string

Behaviour can be changed via Hash.show_ref

val pp : Stdlib.Format.formatter -> t -> unit
val encoding : t Data_encoding.t
val gen : t Gen.t
OCaml

Innovation. Community. Security.