blob: 1b21001fc4bbd6d13a95104a4fdf5b831d22f04e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
/**
@file rexmpp_random.h
@brief Random generation
@author defanor <defanor@uberspace.net>
@date 2023
@copyright MIT license.
*/
#ifndef REXMPP_RANDOM_H
#define REXMPP_RANDOM_H
/**
@brief Fills a buffer with cryptographically-secure random data.
@param[out] buf A buffer to write into.
@param[in] len The number of bytes to fill.
Uses arc4random_buf or gcry_create_nonce, depending on what is
available.
*/
void rexmpp_random_buf (void *buf, size_t len);
#endif
|