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 getrandom(2) kernel random number generator.
17
18       Note that sd_id128_randomize() always returns a UUID Variant 1 Version
19       4 compatible ID. It is hence guaranteed that this function will never
20       return the ID consisting of all zero or all one bits (SD_ID128_NULL,
21       SD_ID128_ALLF).
22
23       For more information about the "sd_id128_t" type, see sd-id128(3).
24
25       systemd-id128(1)'s new command may be used as a command line front-end
26       for sd_id128_randomize().
27

RETURN VALUE

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

NOTES

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

SEE ALSO

37       systemd(1), sd-id128(3), machine-id(5), getrandom(2), random(4),
38       sd_id128_get_machine(3)
39
40
41
42systemd 253                                              SD_ID128_RANDOMIZE(3)
Impressum