Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(2)  |  Derive(0)  |  Import(2)

src/p/y/python-mega-0.1.0/mega/mega.py   python-mega(Download)
from Crypto.Util import Counter
 
from .crypto import prepare_key, stringhash, encrypt_key, decrypt_key,\
    enc_attr, dec_attr, aes_cbc_encrypt_a32
from .utils import a32_to_str, str_to_a32, a32_to_base64, base64_to_a32,\
    def login_user(self, email, password):
        password_aes = prepare_key(str_to_a32(password))
        uh = stringhash(email, password_aes)
        res = self.api_req({'a': 'us', 'user': email, 'uh': uh})
        self._login_common(res, password_aes)

src/p/y/python-mega-HEAD/mega/mega.py   python-mega(Download)
from Crypto.Util import Counter
 
from .crypto import prepare_key, stringhash, encrypt_key, decrypt_key,\
    enc_attr, dec_attr, aes_cbc_encrypt_a32
from .utils import a32_to_str, str_to_a32, a32_to_base64, base64_to_a32,\
    def login_user(self, email, password):
        password_aes = prepare_key(str_to_a32(password))
        uh = stringhash(email, password_aes)
        res = self.api_req({'a': 'us', 'user': email, 'uh': uh})
        self._login_common(res, password_aes)