mirror of
https://github.com/nikdoof/test-auth.git
synced 2026-01-30 16:08:14 +00:00
Brought xmpp/auth.py up to speed for Python 2.6, stops depreciation warning for md5
This commit is contained in:
@@ -23,9 +23,14 @@ from protocol import *
|
|||||||
from client import PlugIn
|
from client import PlugIn
|
||||||
import sha,base64,random,dispatcher,re
|
import sha,base64,random,dispatcher,re
|
||||||
|
|
||||||
import md5
|
try:
|
||||||
def HH(some): return md5.new(some).hexdigest()
|
from hashlib import md5
|
||||||
def H(some): return md5.new(some).digest()
|
except ImportError:
|
||||||
|
import md5 as md5lib
|
||||||
|
def md5(val): return md5lib.new(val)
|
||||||
|
|
||||||
|
def HH(some): return md5(some).hexdigest()
|
||||||
|
def H(some): return md5(some).digest()
|
||||||
def C(some): return ':'.join(some)
|
def C(some): return ':'.join(some)
|
||||||
|
|
||||||
class NonSASL(PlugIn):
|
class NonSASL(PlugIn):
|
||||||
|
|||||||
Reference in New Issue
Block a user