summaryrefslogtreecommitdiff
path: root/rsa/pkcs1_v2.py
diff options
context:
space:
mode:
authorSybren A. Stüvel <sybren@stuvel.eu>2019-08-04 16:41:01 +0200
committerSybren A. Stüvel <sybren@stuvel.eu>2019-08-04 17:05:58 +0200
commitb6cebd53fcafd3088fc8361f6d3466166f75410b (patch)
treea1a3912fb9e91e249e433df0a9b79572f46340f3 /rsa/pkcs1_v2.py
parent6760eb76e665dc81863a82110164c4b3b38e7ee9 (diff)
downloadrsa-git-b6cebd53fcafd3088fc8361f6d3466166f75410b.tar.gz
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.
Diffstat (limited to 'rsa/pkcs1_v2.py')
-rw-r--r--rsa/pkcs1_v2.py2
1 files changed, 1 insertions, 1 deletions
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.