package octez-libs
- Overview
- No Docs
You can search for identifiers within the package.
in-package search v0.2.0
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=55ea1fb8bb3273a7fc270ca8f650d45c56449665619482aad9bc12f3ea736b7e
sha512=fec850fc2d17d7490bbabd5147d62aad13b3aaed8774270f8a38ab419670ed03e0fd30cf8642a97984eca5c2446726fe590ad99c015f7ec50919dc7652f25053
doc/octez-libs.mec/Mec/Digestif/module-type-S/index.html
Module type Digestif.SSource
val empty : ctxAn empty hash context.
feed_bytes msg t adds informations in msg to t. feed is analogous to appending: feed (feed t msg1) msg2 = feed t (append msg1 msg2)
Same as feed_bytes but for String.t.
Same as feed_bytes but for bigstring.
feedi_bytes t iter = let r = ref t in iter (fun msg -> r := feed !r msg); !r
digest_bytes msg is the digest of msg.
digest_bytes msg = get (feed_bytes empty msg).
Same as digest_bytes but for a String.t.
Same as digest_bytes but for a bigstring.
Same as digesti_bytes but for String.t.
Same as digesti_bigstring but for bigstring.
Specialization of digesti_bytes with a list of Bytes.t (see iter).
Same as digestv_bytes but for String.t.
Same as digestv_bytes but for bigstring.
unsafe_compare function returns 0 on equality and a negative/positive int depending on the difference (like String.compare). This is usually OK, but this is not constant time, so in some cases it could leak some information.
val of_hex : string -> tof_hex tries to parse an hexadecimal representation of t. of_hex raises an invalid_argument when input is malformed. We take only firsts digest_size hexadecimal values and ignore rest of input. If it has not enough hexadecimal values, trailing values of the output hash are zero (\x00),
val of_hex_opt : string -> t optionof_hex tries to parse an hexadecimal representation of t. of_hex returns None when input is malformed. We take only first digest_size hexadecimal values and ignore rest of input. If it has not enough hexadecimal values, trailing values of the output hash are zero (\x00).
val consistent_of_hex : string -> tval consistent_of_hex_opt : string -> t optionval of_raw_string : string -> tof_raw_string s see s as a hash. Useful when reading serialized hashes.
val of_raw_string_opt : string -> t optionof_raw_string_opt s see s as a hash. Useful when reading serialized hashes. Returns None if s is not the digest_size bytes long.
val to_raw_string : t -> stringto_raw_string s is (s :> string).