From 2ba447ebad2ec577cdf58998216f30451afb8631 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Mon, 9 Mar 2020 14:55:25 -0700 Subject: [PATCH] Remove self. from self.rsa_private_key, not used elsewhere. This variable is not used anywhere outside this function, so it does not need to be an instance attribute. --- src/mega/mega.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/mega/mega.py b/src/mega/mega.py index d5ee917..21bc0df 100644 --- a/src/mega/mega.py +++ b/src/mega/mega.py @@ -119,20 +119,20 @@ class Mega: ) private_key = a32_to_str(rsa_private_key) - self.rsa_private_key = [0, 0, 0, 0] + rsa_private_key = [0, 0, 0, 0] for i in range(4): l = int( ((private_key[0]) * 256 + (private_key[1]) + 7) / 8 ) + 2 - self.rsa_private_key[i] = mpi_to_int(private_key[:l]) + rsa_private_key[i] = mpi_to_int(private_key[:l]) private_key = private_key[l:] encrypted_sid = mpi_to_int(base64_url_decode(resp['csid'])) rsa_decrypter = RSA.construct( ( - self.rsa_private_key[0] * self.rsa_private_key[1], 257, - self.rsa_private_key[2], self.rsa_private_key[0], - self.rsa_private_key[1] + rsa_private_key[0] * rsa_private_key[1], 257, + rsa_private_key[2], rsa_private_key[0], + rsa_private_key[1] ) ) sid = '%x' % rsa_decrypter._decrypt(encrypted_sid)