package plebeia

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

Type of the prefix part of hash. The length is not fixed in this implementation.

Please note that there is no typing guarantee to prevent merging different size of hashes.

val to_string : t -> string

Get the bytes bytes binary string representation of t.

val of_string : string -> t

bytes bytes binary string representation to t. Note: no check of length.

val length : t -> int
val overwrite_last_2bits : t -> int -> t
val zero : int -> t

zero n returns n bytes of zeros

val to_hex_string : t -> string

Convert to bytes * 2 chars of hexdigits

val of_hex_string : string -> t

Reverse of to_hex_string. Fails if the string is inappropriate.

val show_ref : (t -> string) Stdlib.ref
val show : t -> string
val pp : Stdlib.Format.formatter -> t -> unit
val encoding : int -> t Data_encoding.t

Encoding: fixed length bytes. The size is given as the argument.

val gen : int -> t Gen.t
val to_32byte_string : t -> string
OCaml

Innovation. Community. Security.