#include "../ndn-error-code.h"
#include <inttypes.h>
Go to the source code of this file.
◆ ndn_rng_backend_t
The structure to represent the backend implementation. 
 
 
◆ ndn_rng_impl
      
        
          | typedef int(* ndn_rng_impl) (uint8_t *dest, unsigned size) | 
      
 
ndn_rng_impl type 
This type is the same as micro-ecc/uECC.huECC_RNG_Function
The RNG function should fill 'size' random bytes into 'dest'. It should return 1 if 'dest' was filled with random data, or 0 if the random data could not be generated. The filled-in values should be either truly random, or from a cryptographically-secure PRNG. Setting a correctly functioning RNG function improves the resistance to side-channel attacks. 
 
 
◆ ndn_rng()
      
        
          | int ndn_rng | ( | uint8_t * | dest, | 
        
          |  |  | unsigned | size | 
        
          |  | ) |  |  | 
      
 
Generate a random number. 
YOU CANNOT USE THIS FUNCTION IF YOU ARE USING THE DEFAULT SECURITY BACKEND.
- Parameters
- 
  
    | dest | Buffer to store random number. |  | size | Length of random number to generate. |  
 
 
 
◆ ndn_rng_get_backend()