diff --git a/src/mega/crypto.py b/src/mega/crypto.py index 9d87476..1ca6752 100644 --- a/src/mega/crypto.py +++ b/src/mega/crypto.py @@ -6,7 +6,7 @@ import binascii import random import sys -### Python3 compatibility +# Python3 compatibility if sys.version_info < (3, ): def makebyte(x): diff --git a/src/mega/mega.py b/src/mega/mega.py index eb38599..38df858 100644 --- a/src/mega/mega.py +++ b/src/mega/mega.py @@ -59,7 +59,8 @@ class Mega(object): a32_to_base64(encrypt_key(master_key, password_key)), 'ts': base64_url_encode( - a32_to_str(session_self_challenge) + a32_to_str(encrypt_key(session_self_challenge, master_key)) + a32_to_str(session_self_challenge) + + a32_to_str(encrypt_key(session_self_challenge, master_key)) ) } )