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:
Andrzej Kaczmarek
2022-10-12 20:38:08 +02:00
parent f6567c02bc
commit e7006a8e78
9 changed files with 26 additions and 12 deletions
+1 -1
View File
@@ -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;