X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=PLC%2FPersons.py;h=59ff6ddc2c14f4a855f28867e80a2e9ce09d65d0;hb=dbd0288d599d2cb6fecf1e9bf7b4d0705a641f7a;hp=1d3059f2527cd71c20a7390a594d69b7b8fdd7b1;hpb=5b3409148b4100ff8cde3636d6c68c8f07ad8a87;p=plcapi.git diff --git a/PLC/Persons.py b/PLC/Persons.py index 1d3059f2..59ff6ddc 100644 --- a/PLC/Persons.py +++ b/PLC/Persons.py @@ -10,7 +10,7 @@ from types import StringTypes from datetime import datetime -import md5 +import hashlib import time from random import Random import re @@ -116,7 +116,7 @@ class Person(Row): else: # Generate a somewhat unique 8 character salt string salt = str(time.time()) + str(Random().random()) - salt = md5.md5(salt).hexdigest()[:8] + salt = hashlib.md5(salt).hexdigest()[:8] return crypt.crypt(password.encode(self.api.encoding), magic + salt + "$") validate_date_created = Row.validate_timestamp