Coverage Report

Created: 2026-10-24 08:16

/work/toxcore/rng.c
Line
Count
Source
1
/* SPDX-License-Identifier: GPL-3.0-or-later
2
 * Copyright © 2022-2026 The TokTok team.
3
 */
4
#include "rng.h"
5
6
void rng_bytes(const Random *rng, uint8_t *bytes, uint32_t length)
7
844k
{
8
844k
    rng->funcs->bytes_callback(rng->user_data, bytes, length);
9
844k
}
10
11
uint32_t rng_uniform(const Random *rng, uint32_t upper_bound)
12
104k
{
13
104k
    return rng->funcs->uniform_callback(rng->user_data, upper_bound);
14
104k
}
15