diff options
Diffstat (limited to 'docs/ref/api/util')
| -rw-r--r-- | docs/ref/api/util/index.md | 6 | ||||
| -rw-r--r-- | docs/ref/api/util/nng_random.md | 25 |
2 files changed, 31 insertions, 0 deletions
diff --git a/docs/ref/api/util/index.md b/docs/ref/api/util/index.md index 9f155b65..e11692c6 100644 --- a/docs/ref/api/util/index.md +++ b/docs/ref/api/util/index.md @@ -1,5 +1,11 @@ # Utility Functions +This section documents various utility functions that may help +with application portability. These are not fundamental to NNG +or Scalability Protocols, but we find them useful for a variety +of other uses. + - [nng_clock](nng_clock.md) - [nng_id_map](nng_id_map.md) - [nng_msleep](nng_msleep.md) +- [nng_random](nng_random.md) diff --git a/docs/ref/api/util/nng_random.md b/docs/ref/api/util/nng_random.md new file mode 100644 index 00000000..160752ab --- /dev/null +++ b/docs/ref/api/util/nng_random.md @@ -0,0 +1,25 @@ +# nng_random + +## NAME + +nng_random --- get random number + +## SYNOPSIS + +```c +#include <nng/nng.h> + +uint32_t nng_random(void); +``` + +## DESCRIPTION + +The `nng_random` returns a random number. +The value returned is suitable for use with cryptographic functions such as +key generation. +The value is obtained using platform-specific cryptographically strong random +number facilities when available. + +## RETURN VALUES + +Returns a random 32-bit value. |
