get_rdrand32u_arr() - 5.2 English - 68552

AOCL API Guide (68552)

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

Returns an array of 32-bit values using RDRAND.

This function invokes RDRAND instruction N times to fetch an array of 32-bit values.

On success, the values are written to rng_arr.

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

  • N[in] Number of random values to return

  • retry_count[in] Number of retry attempts

Returns:

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