Using hashlib instead of deprecated md5
This commit is contained in:
parent
51c4cfc7f2
commit
b48033faca
@ -21,7 +21,7 @@ import re
|
||||
from ConfigParser import ConfigParser
|
||||
from cgi import FieldStorage
|
||||
from smtplib import SMTP
|
||||
from md5 import new as newmd5
|
||||
from hashlib import md5
|
||||
from glob import glob
|
||||
from random import randint
|
||||
|
||||
@ -33,7 +33,7 @@ line_start_plus = re.compile("^\+.*$")
|
||||
tab = "\t"
|
||||
|
||||
def generate_uuid(string):
|
||||
string_md5sum = newmd5(string).hexdigest()
|
||||
string_md5sum = md5(string).hexdigest()
|
||||
string = str.join("-", (string_md5sum[0:8], string_md5sum[8:12], string_md5sum[12:16], string_md5sum[16:20], string_md5sum[20:32]))
|
||||
return string
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user