git://git.onelab.eu
/
plcapi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
use hashlib as md5 and sha are deprecated
[plcapi.git]
/
PLC
/
Persons.py
diff --git
a/PLC/Persons.py
b/PLC/Persons.py
index
1d3059f
..
59ff6dd
100644
(file)
--- a/
PLC/Persons.py
+++ b/
PLC/Persons.py
@@
-10,7
+10,7
@@
from types import StringTypes
from datetime import datetime
from types import StringTypes
from datetime import datetime
-import
md5
+import
hashlib
import time
from random import Random
import re
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())
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
return crypt.crypt(password.encode(self.api.encoding), magic + salt + "$")
validate_date_created = Row.validate_timestamp