mirror of
https://github.com/kmackay/micro-ecc.git
synced 2026-07-29 14:47:46 +00:00
Fix fake rng to fill the buffer correctly.
This commit is contained in:
@@ -19,6 +19,7 @@ int fake_rng(uint8_t *dest, unsigned size) {
|
||||
|
||||
unsigned amount = (size > 8 ? 8 : size);
|
||||
memcpy(dest, &g_rand, amount);
|
||||
dest += amount;
|
||||
size -= amount;
|
||||
}
|
||||
return 1;
|
||||
|
||||
@@ -19,6 +19,7 @@ int fake_rng(uint8_t *dest, unsigned size) {
|
||||
|
||||
unsigned amount = (size > 8 ? 8 : size);
|
||||
memcpy(dest, &g_rand, amount);
|
||||
dest += amount;
|
||||
size -= amount;
|
||||
}
|
||||
return 1;
|
||||
|
||||
@@ -19,6 +19,7 @@ int fake_rng(uint8_t *dest, unsigned size) {
|
||||
|
||||
unsigned amount = (size > 8 ? 8 : size);
|
||||
memcpy(dest, &g_rand, amount);
|
||||
dest += amount;
|
||||
size -= amount;
|
||||
}
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user