Skip to content

Commit

Permalink
Only read 32 bytes from /dev/urandom for a seed.
Browse files Browse the repository at this point in the history
Use setbuf() to remove the buffering.
  • Loading branch information
rdebath committed May 1, 2017
1 parent 7fa6712 commit 1f62be1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/seed.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ int ed25519_create_seed(unsigned char *seed) {
return 1;
}

setbuf(f, NULL);
fread(seed, 1, 32, f);
fclose(f);
#endif
Expand Down

0 comments on commit 1f62be1

Please sign in to comment.