1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-12 18:49:07 +00:00

new trezor-crypto, uint32_t -> size_t

This commit is contained in:
Pavol Rusnak 2014-07-17 16:41:34 +02:00
parent ea4d99cfee
commit cb39ab7b6d
3 changed files with 6 additions and 4 deletions

5
rng.c
View File

@ -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
View File

@ -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