package digestif

  1. Overview
  2. Docs
Hashes implementations (SHA*, RIPEMD160, BLAKE2*, BLAKE3 and MD5)

Install

dune-project
 Dependency

Authors

Maintainers

Sources

digestif-1.4.1.tbz
sha256=d9a98b16219651defdeb996c79d1abeed3aff309bac0394c98f91fa20f2b8ef9
sha512=cd94e6c57a3f8c348ade26986756179564bbf1bdfacaa86fb66212748aa8fd4af69940816622265a78fd57cb79d9af1cd2e8aa3ac270ade0a7d83fc8c9152b11

doc/src/digestif.ocaml/baijiu_sha3_256.ml.html

Source file baijiu_sha3_256.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
module By = Digestif_by
module Bi = Digestif_bi

module type S = sig
  type ctx
  type kind = [ `SHA3_256 ]

  val init : unit -> ctx
  val unsafe_feed_bytes : ctx -> By.t -> int -> int -> unit
  val unsafe_feed_bigstring : ctx -> Bi.t -> int -> int -> unit
  val unsafe_get : ctx -> By.t
  val dup : ctx -> ctx
end

module Unsafe : S = struct
  type kind = [ `SHA3_256 ]

  module U = Baijiu_sha3.Unsafe (struct
    let padding = Baijiu_sha3.nist_padding
  end)

  open U

  type nonrec ctx = ctx

  let init () = U.init 32
  let unsafe_get = unsafe_get
  let dup = dup
  let unsafe_feed_bytes = unsafe_feed_bytes
  let unsafe_feed_bigstring = unsafe_feed_bigstring
end