mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-08 04:52:30 +00:00
Port crypto from grammers
This commit is contained in:
15
client/tests/rsa_test.py
Normal file
15
client/tests/rsa_test.py
Normal file
@@ -0,0 +1,15 @@
|
||||
from telethon._impl.crypto.rsa import (
|
||||
PRODUCTION_RSA_KEY,
|
||||
TESTMODE_RSA_KEY,
|
||||
compute_fingerprint,
|
||||
)
|
||||
|
||||
|
||||
def test_fingerprint_1() -> None:
|
||||
fp = compute_fingerprint(PRODUCTION_RSA_KEY)
|
||||
assert fp == -3414540481677951611
|
||||
|
||||
|
||||
def test_fingerprint_2() -> None:
|
||||
fp = compute_fingerprint(TESTMODE_RSA_KEY)
|
||||
assert fp == -5595554452916591101
|
Reference in New Issue
Block a user