mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-22 22:38:08 +00:00
new trezor-crypto, uint32_t -> size_t
This commit is contained in:
parent
ea4d99cfee
commit
cb39ab7b6d
5
rng.c
5
rng.c
@ -35,9 +35,10 @@ uint32_t random32(void)
|
||||
return new;
|
||||
}
|
||||
|
||||
void random_buffer(uint8_t *buf, uint32_t len)
|
||||
void random_buffer(uint8_t *buf, size_t len)
|
||||
{
|
||||
uint32_t i, r = 0;
|
||||
size_t i;
|
||||
uint32_t r = 0;
|
||||
for (i = 0; i < len; i++) {
|
||||
if (i % 4 == 0) {
|
||||
r = random32();
|
||||
|
3
rng.h
3
rng.h
@ -21,8 +21,9 @@
|
||||
#define __RNG_H__
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
uint32_t random32(void);
|
||||
void random_buffer(uint8_t *buf, uint32_t len);
|
||||
void random_buffer(uint8_t *buf, size_t len);
|
||||
|
||||
#endif
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 3747ba432336bf10191a63e84fbfead62e944ddb
|
||||
Subproject commit ffd2d69dd658bad0e78cad853f8b81f2cd3e4b05
|
Loading…
Reference in New Issue
Block a user