mirror of
https://github.com/Lost-MSth/Arcaea-server.git
synced 2026-02-11 10:27:27 +08:00
[Enhance] Link Play 2.0 e.t.c.
- For Arcaea 5.10.1(c) - Add support for Link Play 2.0. - New partners "Luna & Ilot" and "Eto & Hoppe" - Add support for the skill of "Eto & Hoppe". - Add support for refreshing ratings of Recent 30 via API and webpage. Note: This is a bug testing version.
This commit is contained in:
@@ -10,7 +10,7 @@ def aes_gcm_128_encrypt(key, plaintext, associated_data):
|
||||
iv = os.urandom(12)
|
||||
encryptor = Cipher(
|
||||
algorithms.AES(key),
|
||||
modes.GCM(iv, min_tag_length=12),
|
||||
modes.GCM(iv, min_tag_length=16),
|
||||
).encryptor()
|
||||
encryptor.authenticate_additional_data(associated_data)
|
||||
ciphertext = encryptor.update(plaintext) + encryptor.finalize()
|
||||
@@ -20,7 +20,7 @@ def aes_gcm_128_encrypt(key, plaintext, associated_data):
|
||||
def aes_gcm_128_decrypt(key, associated_data, iv, ciphertext, tag):
|
||||
decryptor = Cipher(
|
||||
algorithms.AES(key),
|
||||
modes.GCM(iv, tag, min_tag_length=12),
|
||||
modes.GCM(iv, tag, min_tag_length=16),
|
||||
).decryptor()
|
||||
decryptor.authenticate_additional_data(associated_data)
|
||||
return decryptor.update(ciphertext) + decryptor.finalize()
|
||||
|
||||
Reference in New Issue
Block a user