get_rdrand32u() - 5.2 English - 68552

AOCL API Guide (68552)

Document ID
68552
Release Date
2025-12-29
Version
5.2 English
int get_rdrand32u(uint32_t *rng_val, unsigned int retry_count)#

Returns a single 32-bit value using RDRAND.

This function invokes RDRAND instruction to fetch a single 32-bit value.

On success, the value returned by RDRAND is written to rng_val.

On failure, the function retries invoking RDRAND retry_count times. Any failure after this, the function will return error.
Parameters:
  • rng_val[out] Pointer to memory to store the value returned by RDRAND

  • retry_count[in] Number of retry attempts

Returns:

success or failure status of function call: SECRNG_SUCCESS, SECRNG_FAILURE, SECRNG_NOTSUPPORTED