[FIX] base_encrypt: unicode convert to utf-8
bzr revid: kjo@tinyerp.com-20111018093813-ghtt14ahp470hmd2
This commit is contained in:
@@ -70,6 +70,8 @@ def gen_salt( length=8, symbols=ascii_letters + digits ):
|
||||
import hashlib
|
||||
|
||||
def encrypt_md5( raw_pw, salt, magic=magic_md5 ):
|
||||
raw_pw = raw_pw.encode('utf-8')
|
||||
salt = salt.encode('utf-8')
|
||||
hash = hashlib.md5()
|
||||
hash.update( raw_pw + magic + salt )
|
||||
st = hashlib.md5()
|
||||
|
||||
Reference in New Issue
Block a user