Commit 05f45e9f authored by Sam Rushing's avatar Sam Rushing

use os.urandom() to seed the SURF generator [per Eric Huss]

parent 6d951921
...@@ -851,9 +851,7 @@ from coro.lru import lru_with_pin ...@@ -851,9 +851,7 @@ from coro.lru import lru_with_pin
from coro.dns.reply import unpack_reply from coro.dns.reply import unpack_reply
import os import os
import hashlib set_seed (os.urandom (128))
seed = hashlib.sha512 (repr (coro.get_now()) + repr(os.getpid())).digest()
set_seed (seed + seed)
if not coro.has_ipv6(): if not coro.has_ipv6():
root_hints = [ x for x in root_hints if not ':' in x ] root_hints = [ x for x in root_hints if not ':' in x ]
......
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