Entropy:
- we are now >=Python2.5 only, sorry 2.4 git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@2602 cd1c1023-2f26-0410-ae45-c471fc1f0318
This commit is contained in:
+12
-12
@@ -19714,8 +19714,8 @@ class phpBB3AuthInterface(DistributionAuthInterface,RemoteDbSkelInterface):
|
||||
'session_admin': session_admin,
|
||||
'session_forum_id': 0,
|
||||
}
|
||||
import md5
|
||||
m = md5.new()
|
||||
import hashlib
|
||||
m = hashlib.md5()
|
||||
m.update(str(user_id)+str(time_now)+str(self.USER_AGENT)+str(ip_address)+str(autologin)+str(myuserprefs['user_allow_viewonline']))
|
||||
session_data['session_id'] = m.hexdigest()
|
||||
|
||||
@@ -19776,8 +19776,8 @@ class phpBB3AuthInterface(DistributionAuthInterface,RemoteDbSkelInterface):
|
||||
return False
|
||||
|
||||
def _get_unique_id(self):
|
||||
import md5
|
||||
m = md5.new()
|
||||
import hashlib
|
||||
m = hashlib.md5()
|
||||
rnd = str(abs(hash(os.urandom(20))))
|
||||
m.update(rnd)
|
||||
x = m.hexdigest()[:-16]
|
||||
@@ -19800,8 +19800,8 @@ class phpBB3AuthInterface(DistributionAuthInterface,RemoteDbSkelInterface):
|
||||
if len(myhash) == 34:
|
||||
return myhash
|
||||
|
||||
import md5
|
||||
m = md5.new()
|
||||
import hashlib
|
||||
m = hashlib.md5()
|
||||
m.update(myhash)
|
||||
return m.hexdigest()
|
||||
|
||||
@@ -19836,8 +19836,8 @@ class phpBB3AuthInterface(DistributionAuthInterface,RemoteDbSkelInterface):
|
||||
if len(salt) != 8:
|
||||
return myoutput
|
||||
|
||||
import md5
|
||||
m = md5.new()
|
||||
import hashlib
|
||||
m = hashlib.md5()
|
||||
m.update(salt+password)
|
||||
myhash = m.digest()
|
||||
while count:
|
||||
@@ -19887,8 +19887,8 @@ class phpBB3AuthInterface(DistributionAuthInterface,RemoteDbSkelInterface):
|
||||
if len(myhash) == 34:
|
||||
return self._hash_crypt_private(password, myhash) == myhash
|
||||
|
||||
import md5
|
||||
m = md5.new()
|
||||
import hashlib
|
||||
m = hashlib.md5()
|
||||
m.update(password)
|
||||
rhash = m.hexdigest()
|
||||
return rhash == myhash
|
||||
@@ -32922,8 +32922,8 @@ class EntropyDatabaseInterface:
|
||||
m.update(str(item))
|
||||
|
||||
if strings:
|
||||
import md5
|
||||
m = md5.new()
|
||||
import hashlib
|
||||
m = hashlib.md5()
|
||||
|
||||
self.cursor.execute('select idpackage,atom,name,version,versiontag,revision,branch,slot,etpapi,trigger from baseinfo'+idpackage_order)
|
||||
if strings:
|
||||
|
||||
@@ -355,8 +355,8 @@ def countdown(secs=5,what="Counting...", back = False):
|
||||
time.sleep(1)
|
||||
|
||||
def md5sum(filepath):
|
||||
import md5
|
||||
m = md5.new()
|
||||
import hashlib
|
||||
m = hashlib.md5()
|
||||
readfile = open(filepath)
|
||||
block = readfile.read(1024)
|
||||
while block:
|
||||
@@ -369,8 +369,8 @@ def md5sum_directory(directory, get_obj = False):
|
||||
if not os.path.isdir(directory):
|
||||
raise exceptionTools.DirectoryNotFound("DirectoryNotFound: directory just does not exist.")
|
||||
myfiles = os.listdir(directory)
|
||||
import md5
|
||||
m = md5.new()
|
||||
import hashlib
|
||||
m = hashlib.md5()
|
||||
if not myfiles:
|
||||
if get_obj:
|
||||
return m
|
||||
@@ -728,8 +728,8 @@ def compareMd5(filepath,checksum):
|
||||
return False
|
||||
|
||||
def md5string(string):
|
||||
import md5
|
||||
m = md5.new()
|
||||
import hashlib
|
||||
m = hashlib.md5()
|
||||
m.update(string)
|
||||
return m.hexdigest()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user