]>
git.ipfire.org Git - thirdparty/systemd.git/blob - src/basic/random-util.h
723917057ddb9071cdd1e8d9eb24ad5d929f2fdf
1 /* SPDX-License-Identifier: LGPL-2.1+ */
5 This file is part of systemd.
7 Copyright 2010 Lennart Poettering
14 int acquire_random_bytes(void *p
, size_t n
, bool high_quality_required
);
15 void pseudorandom_bytes(void *p
, size_t n
);
16 void random_bytes(void *p
, size_t n
);
17 void initialize_srand(void);
19 static inline uint64_t random_u64(void) {
21 random_bytes(&u
, sizeof(u
));
25 static inline uint32_t random_u32(void) {
27 random_bytes(&u
, sizeof(u
));