DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 

(gcrypt.info.gz) Retrieving random numbers

Info Catalog (gcrypt.info.gz) Quality of random numbers (gcrypt.info.gz) Random Numbers
 
 9.2 Retrieving random numbers
 =============================
 
  -- Function: void gcry_randomize (unsigned char *BUFFER, size_t
           LENGTH, enum gcry_random_level LEVEL)
      Fill BUFFER with LENGTH random bytes using a random quality as
      defined by LEVEL.
 
  -- Function: void * gcry_random_bytes (size_t NBYTES, enum
           gcry_random_level LEVEL)
      Allocate a memory block consisting of NBYTES fresh random bytes
      using a random quality as defined by LEVEL.
 
  -- Function: void * gcry_random_bytes_secure (size_t NBYTES, enum
           gcry_random_level LEVEL)
      Allocate a memory block consisting of NBYTES fresh random bytes
      using a random quality as defined by LEVEL.  This function differs
      from `gcry_random_bytes' in that the returned buffer is allocated
      in a "secure" area of the memory.
 
  -- Function: void gcry_create_nonce (void *BUFFER, size_t LENGTH)
      Fill BUFFER with LENGTH unpredictable bytes.  This is commonly
      called a nonce and may also be used for initialization vectors and
      padding.  This is an extra function nearly independent of the
      other random function for 3 reasons: It better protects the
      regular random generator's internal state, provides better
      performance and does not drain the precious entropy pool.
 
 
Info Catalog (gcrypt.info.gz) Quality of random numbers (gcrypt.info.gz) Random Numbers
automatically generated byinfo2html