Google Cloud IoT device SDK for embedded C  1.0.2
iotc_bsp_rng.h File Reference

Go to the source code of this file.

Functions

void iotc_bsp_rng_init ()
 
uint32_t iotc_bsp_rng_get ()
 
void iotc_bsp_rng_shutdown ()
 

Detailed Description

Generates random numbers.

Always implement an entropy-based hardware RNG; don't hardcode the same seed value for all devices. The SDK prevents DDoS attacks by randomly attempting fleet-wide reconnections, so predictable numbers may corrupt the backoff system.

Definition in file iotc_bsp_rng.h.

Function Documentation

◆ iotc_bsp_rng_get()

uint32_t iotc_bsp_rng_get ( )

Generates and returns a random, 32-bit integer.

◆ iotc_bsp_rng_init()

void iotc_bsp_rng_init ( )

Initializes the platform-specific RNG requirements.

The SDK calls this function after booting and before requesting the first random number.

◆ iotc_bsp_rng_shutdown()

void iotc_bsp_rng_shutdown ( )

Shuts down the RNG and frees all of the resources from initializing and generating random numbers.