Ticket #2570: hex_entropy_sha.diff
| File hex_entropy_sha.diff, 462 bytes (added by cmlenz, 4 years ago) |
|---|
-
trac/util/__init__.py
255 255 # -- crypto utils 256 256 257 257 def hex_entropy(bytes=32): 258 import md5258 import sha 259 259 import random 260 return md5.md5(str(random.random())).hexdigest()[:bytes]260 return sha.new(str(random.random())).hexdigest()[:bytes] 261 261 262 262 263 263 # Original license for md5crypt:
