mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 23:58:20 +00:00
We already had imported hashlib.
This commit is contained in:
parent
7ebd68c7b2
commit
5105cee2e4
1 changed files with 2 additions and 3 deletions
|
@ -1053,7 +1053,6 @@ def llFloor(f):
|
|||
|
||||
if lslcommon.IsCalc:
|
||||
import time
|
||||
from hashlib import md5
|
||||
import random
|
||||
def llFrand(lim):
|
||||
assert isfloat(lim)
|
||||
|
@ -1068,8 +1067,8 @@ if lslcommon.IsCalc:
|
|||
return val
|
||||
|
||||
def llGenerateKey():
|
||||
s = md5((u'%.17g %f %f' % (time.time(), random.random(),
|
||||
random.random())).encode('utf8')
|
||||
s = hashlib.md5((u'%.17g %f %f' % (time.time(), random.random(),
|
||||
random.random())).encode('utf8')
|
||||
).hexdigest()
|
||||
return Key(s[:8] + '-' + s[8:12] + '-' + s[12:16] + '-' + s[16:20]
|
||||
+ '-' + s[20:32])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue