tests: use appropriate sys_randX_get()
use the appropriate sys_randX_get() instead of always sys_rand32_get(). Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
This commit is contained in:
parent
a9afee1d12
commit
e354927895
37 changed files with 58 additions and 83 deletions
|
@ -616,14 +616,7 @@ int default_CSPRNG(uint8_t *dest, unsigned int size)
|
|||
/* This is not a CSPRNG, but it's the only thing available in the
|
||||
* system at this point in time. */
|
||||
|
||||
while (size) {
|
||||
uint32_t len = size >= sizeof(uint32_t) ? sizeof(uint32_t) : size;
|
||||
uint32_t rv = sys_rand32_get();
|
||||
|
||||
memcpy(dest, &rv, len);
|
||||
dest += len;
|
||||
size -= len;
|
||||
}
|
||||
sys_rand_get(dest, size);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue