Commit 8b3669c0 authored by yids's avatar yids
Browse files

Merge branch 'master' of gitlab.com:hrk_hrk/avr-pager

parents 0f73518e 5058f740
......@@ -5,14 +5,17 @@
#include <stdlib.h>
#include "things.h"
#include "pagerlib.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
unsigned char fakeiv[] = "123456789abcdefghijklmnop";
int rng (uint8_t *dest, unsigned size) {
#ifndef ARDUINO
int fd = open("/dev/urandom", O_RDONLY | O_CLOEXEC);
int fd = open("/dev/urandom", O_RDONLY);
if (fd == -1) {
fd = open("/dev/random", O_RDONLY | O_CLOEXEC);
fd = open("/dev/random", O_RDONLY);
if (fd == -1) {
return 0;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment