ndn-lite
ndn-lite-rng.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2018-2019 Zhiyi Zhang
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v3.0. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
9 #ifndef NDN_SECURITY_RNG_H_
10 #define NDN_SECURITY_RNG_H_
11 
12 #include "../ndn-error-code.h"
13 #include <inttypes.h>
14 
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18 
30 typedef int (*ndn_rng_impl)(uint8_t* dest, unsigned size);
31 
35 typedef struct ndn_rng_backend {
38 
41 
51 int
52 ndn_rng(uint8_t *dest, unsigned size);
53 
54 #ifdef __cplusplus
55 }
56 #endif
57 
58 #endif // NDN_SECURITY_RNG_H_
ndn_rng_impl rng
Definition: ndn-lite-rng.h:36
int(* ndn_rng_impl)(uint8_t *dest, unsigned size)
ndn_rng_impl type
Definition: ndn-lite-rng.h:30
ndn_rng_backend_t * ndn_rng_get_backend(void)
Definition: ndn-lite-rng.c:15
int ndn_rng(uint8_t *dest, unsigned size)
Generate a random number.
Definition: ndn-lite-rng.c:21
struct ndn_rng_backend ndn_rng_backend_t
The structure to represent the backend implementation.
The structure to represent the backend implementation.
Definition: ndn-lite-rng.h:35