mirror of
https://github.com/samba-team/samba.git
synced 2025-02-26 21:57:41 +03:00
lib:util: Fix documentation for random number functions
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
This commit is contained in:
parent
4d276a93fc
commit
97c441d7c2
@ -33,13 +33,16 @@
|
||||
|
||||
_PUBLIC_ void generate_random_buffer(uint8_t *out, int len)
|
||||
{
|
||||
/* Thread and fork safe random number generator for temporary keys. */
|
||||
/* Random number generator for temporary keys. */
|
||||
gnutls_rnd(GNUTLS_RND_RANDOM, out, len);
|
||||
}
|
||||
|
||||
_PUBLIC_ void generate_secret_buffer(uint8_t *out, int len)
|
||||
{
|
||||
/* The key generator, will re-seed after a fixed amount of bytes is
|
||||
/*
|
||||
* Random number generator for long term keys.
|
||||
*
|
||||
* The key generator, will re-seed after a fixed amount of bytes is
|
||||
* generated (typically less than the nonce), and will also re-seed
|
||||
* based on time, i.e., after few hours of operation without reaching
|
||||
* the limit for a re-seed. For its re-seed it mixes mixes data obtained
|
||||
@ -51,6 +54,8 @@ _PUBLIC_ void generate_secret_buffer(uint8_t *out, int len)
|
||||
_PUBLIC_ void generate_nonce_buffer(uint8_t *out, int len)
|
||||
{
|
||||
/*
|
||||
* Random number generator for nonce and initialization vectors.
|
||||
*
|
||||
* The nonce generator will reseed after outputting a fixed amount of
|
||||
* bytes (typically few megabytes), or after few hours of operation
|
||||
* without reaching the limit has passed.
|
||||
|
@ -20,12 +20,16 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* Thread and fork safe random number generator for temporary keys.
|
||||
* @brief Generate random values for session and temporary keys.
|
||||
*
|
||||
* @param[in] out A pointer to the buffer to fill with random data.
|
||||
*
|
||||
* @param[in] len The size of the buffer to fill.
|
||||
*/
|
||||
void generate_random_buffer(uint8_t *out, int len);
|
||||
|
||||
/**
|
||||
* @brief Generate random values for key buffers (e.g. session keys)
|
||||
* @brief Generate random values for long term keys and passwords.
|
||||
*
|
||||
* @param[in] out A pointer to the buffer to fill with random data.
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user