package nocrypto

  1. Overview
  2. Docs

Augmented numeric type. Includes basic common numeric ops, range of conversions to and from variously-sized int types, and a few basic function for representing such numbers as Cstruct.t.

type t
val zero : t
val one : t
val (lsr) : t -> int -> t
val (lsl) : t -> int -> t
val (land) : t -> t -> t
val (lor) : t -> t -> t
val (lxor) : t -> t -> t
val (+) : t -> t -> t
val (-) : t -> t -> t
val succ : t -> t
val pred : t -> t
val of_int : int -> t
val of_int32 : int32 -> t
val of_int64 : int64 -> t
val to_int : t -> int
val to_int32 : t -> int32
val to_int64 : t -> int64
val bit_bound : t -> int
val pp_print : Stdlib.Format.formatter -> t -> unit
val bits : t -> int
val of_cstruct_be : ?bits:int -> Cstruct.t -> t
val to_cstruct_be : ?size:int -> t -> Cstruct.t
val into_cstruct_be : t -> Cstruct.t -> unit
OCaml

Innovation. Community. Security.