[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [oonib/master] Use SystemRandom instead of insecure RNG



commit 7dfd89b22c66eb4cfc38218b9430adc38e8ad073
Author: Arturo Filastò <art@xxxxxxxxx>
Date:   Wed May 21 12:46:16 2014 +0200

    Use SystemRandom instead of insecure RNG
---
 oonib/__init__.py |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/oonib/__init__.py b/oonib/__init__.py
index 980acb0..1c465d1 100644
--- a/oonib/__init__.py
+++ b/oonib/__init__.py
@@ -8,7 +8,8 @@ __version__ = '1.0.0'
 __all__ = ['Storage', 'randomStr']
 
 import string
-import random
+from random import SystemRandom
+random = SystemRandom()
 
 
 class Storage(dict):



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits