(no title)
eliteraspberrie | 10 years ago
I doubt eight bytes is enough for cryptography...
If you need random bytes in Python, use os.urandom:
secret = os.urandom(32)
https://docs.python.org/2/library/os.html#os.urandomeliteraspberrie | 10 years ago
I doubt eight bytes is enough for cryptography...
If you need random bytes in Python, use os.urandom:
secret = os.urandom(32)
https://docs.python.org/2/library/os.html#os.urandom
michwill|10 years ago
Pretty sad if it is not the case! Interestingly enough, RNG in pycryptodome which I was using for zerodb is urandom. https://github.com/Legrandin/pycryptodome/blob/master/lib/Cr...
Would be interesting to see similar gotchas about that library (though everybody uses PyCrypto, that makes me feel a little paranoid!)
technion|10 years ago