package irmin

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

Hash provides base functions on commit IDs.

Signature for unique identifiers.

include Hum.S with type t = commit_id
include Tc.S0 with type t = commit_id
type t = commit_id
val equal : t Tc.equal
val compare : t Tc.compare
val hash : t Tc.hash
val to_json : t Tc.to_json

The REST inteface.

val of_json : t Tc.of_json
val size_of : t Tc.size_of

The serialization format.

val write : t Tc.writer
val read : t Tc.reader
val to_hum : t -> string

Display a value using its human readable representation.

val of_hum : string -> t

Convert a human readable representation of a value into its abstract value.

  • raises Invalid_argument

    if the string does not represent anything meaningful.

val digest : Cstruct.t -> t

Compute a deterministic store key from a Cstruct.t value.

val has_kind : [> `SHA1 ] -> bool

The kind of generated hash.

val to_raw : t -> Cstruct.t

The raw hash value.

val of_raw : Cstruct.t -> t

Abstract a hash value.

val digest_size : int

digest_size is the size of hash results, in bytes.

OCaml

Innovation. Community. Security.