-
Notifications
You must be signed in to change notification settings - Fork 37
Closed
Labels
Description
Hi Daan, I found a little issue here:
Line 221 in a29d979
| fd = open("/dev/urandom", O_RDONLY); |
/dev/urandom is opened at each call of the randombytes_linux_randombytes_urandom() but never closed.
I would suggest ether:
- close at the exit of the function
- use for fd a static variable initialized to -1 test it and if equal to -1 open the device and assign the descriptor to fd
the last could save some time if the function is called repeatedly
jaromil