Merge pull request #68 from kokarare1212/deepsource-transform-9c2a7ab4

Format code with yapf
This commit is contained in:
こうから 2021-09-15 06:52:15 +09:00 committed by GitHub
commit 967986173b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -1111,7 +1111,11 @@ class Session(Closeable, MessageListener, SubListener):
sha1 = SHA1.new()
sha1.update(device_id.encode())
secret = sha1.digest()
base_key = PBKDF2(secret, username.encode(), 20, 0x100, hmac_hash_module=SHA1)
base_key = PBKDF2(secret,
username.encode(),
20,
0x100,
hmac_hash_module=SHA1)
sha1 = SHA1.new()
sha1.update(base_key)
key = sha1.digest() + b"\x00\x00\x00\x14"