From b6cebd53fcafd3088fc8361f6d3466166f75410b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Sun, 4 Aug 2019 16:41:01 +0200 Subject: Added type annotations + some fixes to get them correct One functional change: `CryptoOperation.read_infile()` now reads bytes from `sys.stdin` instead of text. This is necessary to be consistent with the rest of the code, which all deals with bytes. --- rsa/pkcs1_v2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rsa/pkcs1_v2.py') diff --git a/rsa/pkcs1_v2.py b/rsa/pkcs1_v2.py index 6242a71..b751399 100644 --- a/rsa/pkcs1_v2.py +++ b/rsa/pkcs1_v2.py @@ -27,7 +27,7 @@ from rsa import ( ) -def mgf1(seed, length, hasher='SHA-1'): +def mgf1(seed: bytes, length: int, hasher='SHA-1') -> bytes: """ MGF1 is a Mask Generation Function based on a hash function. -- cgit v1.2.1