mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-10-06 22:57:22 +00:00
nimble/ll: Add API to read random data from controller
This may be useful to get some random if MCU does not support trng, e.g. as on nRF5340 app core.
This commit is contained in:
@@ -837,7 +837,7 @@ static void auth_passkey_display(uint16_t conn_handle, unsigned int passkey)
|
||||
return;
|
||||
}
|
||||
|
||||
rc = ble_hs_hci_util_rand(&pk.passkey, sizeof(pk.passkey));
|
||||
rc = ble_hs_hci_rand(&pk.passkey, sizeof(pk.passkey));
|
||||
assert(rc == 0);
|
||||
/* Max value is 999999 */
|
||||
pk.passkey %= 1000000;
|
||||
|
||||
Reference in New Issue
Block a user