[FIX] base_encrypt: unicode convert to utf-8

bzr revid: kjo@tinyerp.com-20111018093813-ghtt14ahp470hmd2
This commit is contained in:
Kuldeep Joshi (OpenERP) 2011-10-18 15:08:13 +05:30
parent 0ed8e29753
commit 2b4cf1d63f
1 changed files with 2 additions and 0 deletions

View File

@ -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()