Skip to content

Commit

Permalink
Convert nng_random to new format.
Browse files Browse the repository at this point in the history
  • Loading branch information
gdamore committed Oct 7, 2024
1 parent 964132c commit 9199597
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 3 deletions.
4 changes: 4 additions & 0 deletions docs/ref/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@
- [API](./api.md)

- [Threading Functions](./api/thr/index.md)

- [nng_mtx](./api/thr/nng_mtx.md)

- [Utility Functions](./api/util/index.md)

- [nng_clock](./api/util/nng_clock.md)
- [nng_id_map](./api/util/nng_id_map.md)
- [nng_msleep](./api/util/nng_msleep.md)
- [nng_random](./api/util/nng_random.md)

- [Transports](./tran/index.md)

Expand Down
3 changes: 0 additions & 3 deletions docs/ref/api/util.md

This file was deleted.

6 changes: 6 additions & 0 deletions docs/ref/api/util/index.md
Original file line number Diff line number Diff line change
@@ -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)
25 changes: 25 additions & 0 deletions docs/ref/api/util/nng_random.md
Original file line number Diff line number Diff line change
@@ -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.

0 comments on commit 9199597

Please sign in to comment.