get_rdseed_bytes_arr() - 5.2 English - 68552

AOCL API Guide (68552)

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

Returns an array of random bytes of the given size using RDSEED.

This function invokes RDSEED instruction multiple times to fetch an array of random bytes of given size.

On success, the values are written to rng_arr.

On failure, it returns error.
Parameters:
  • rng_arr[out] Pointer to memory to store the random bytes

  • N[in] Number of random bytes to return

  • retry_count[in] Number of retry attempts

Returns:

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