Next: Retrieving random numbers, Up: Random Numbers [Contents][Index]
Libgcypt offers random numbers of different quality levels:
The constants for the random quality levels are of this enum type.
GCRY_WEAK_RANDOM
For all functions, except for gcry_mpi_randomize
, this level maps
to GCRY_STRONG_RANDOM
. If you do not want this, consider using
gcry_create_nonce
.
GCRY_STRONG_RANDOM
Use this level for session keys and similar purposes.
GCRY_VERY_STRONG_RANDOM
Use this level for long term key material.