aboutsummaryrefslogtreecommitdiff
path: root/docs/ref/api/util/nng_random.md
blob: 160752ab90748b2065acde592816e0a2ed74b8c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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.