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.
This commit is contained in:
parent
ebca1d4826
commit
2ba447ebad
1 changed files with 5 additions and 5 deletions
|
@ -119,20 +119,20 @@ class Mega:
|
||||||
)
|
)
|
||||||
|
|
||||||
private_key = a32_to_str(rsa_private_key)
|
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):
|
for i in range(4):
|
||||||
l = int(
|
l = int(
|
||||||
((private_key[0]) * 256 + (private_key[1]) + 7) / 8
|
((private_key[0]) * 256 + (private_key[1]) + 7) / 8
|
||||||
) + 2
|
) + 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:]
|
private_key = private_key[l:]
|
||||||
|
|
||||||
encrypted_sid = mpi_to_int(base64_url_decode(resp['csid']))
|
encrypted_sid = mpi_to_int(base64_url_decode(resp['csid']))
|
||||||
rsa_decrypter = RSA.construct(
|
rsa_decrypter = RSA.construct(
|
||||||
(
|
(
|
||||||
self.rsa_private_key[0] * self.rsa_private_key[1], 257,
|
rsa_private_key[0] * rsa_private_key[1], 257,
|
||||||
self.rsa_private_key[2], self.rsa_private_key[0],
|
rsa_private_key[2], rsa_private_key[0],
|
||||||
self.rsa_private_key[1]
|
rsa_private_key[1]
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
sid = '%x' % rsa_decrypter._decrypt(encrypted_sid)
|
sid = '%x' % rsa_decrypter._decrypt(encrypted_sid)
|
||||||
|
|
Loading…
Reference in a new issue