1SD_ID128_RANDOMIZE(3)         sd_id128_randomize         SD_ID128_RANDOMIZE(3)
2
3
4

NAME

6       sd_id128_randomize - Generate 128-bit IDs
7

SYNOPSIS

9       #include <systemd/sd-id128.h>
10
11       int sd_id128_randomize(sd_id128_t *ret);
12

DESCRIPTION

14       sd_id128_randomize() generates a new randomized 128-bit ID and returns
15       it in ret. Every invocation returns a new randomly generated ID. This
16       uses the /dev/urandom kernel random number generator.
17
18       Note that sd_id128_randomize() always returns a UUID v4-compatible ID.
19
20       For more information about the "sd_id128_t" type, see sd-id128(3).
21
22       journalctl(1)'s --new-id128 option may be used as a command line
23       front-end for sd_id128_randomize().
24

RETURN VALUE

26       The call returns 0 on success (in which case ret is filled in), or a
27       negative errno-style error code.
28

NOTES

30       These APIs are implemented as a shared library, which can be compiled
31       and linked to with the libsystemd pkg-config(1) file.
32

SEE ALSO

34       systemd(1), sd-id128(3), machine-id(5), random(4),
35       sd_id128_get_machine(3)
36
37
38
39systemd 239                                              SD_ID128_RANDOMIZE(3)
Impressum