Legend:
Library
Module
Module type
Parameter
Class
Class type
Agile, multiplexing interface for HMAC-DRBG
The supported hashing algorithms are SHA2-256, SHA2-384, SHA2-512.
Users first need to instantiate an internal state with a compatible hashing algorithm and an optional but recommended personalization string. The generate or Noalloc.generate functions can then be called any number of times.
Users have the possibility to reseed, but it is not required.
instantiate ?personalization_string alg allocates the internal state for algorithm alg using the optional personalization_string and returns a t.
val generate : ?additional_input:bytes->t->int ->bytes option
generate ?additional_input st size takes optional additional_input, a state st and size, the desired number of random bytes, and returns such a buffer if successful.