From 1996361adc585ca244f2aa2134788732abe7153f Mon Sep 17 00:00:00 2001 From: Markus Wamser Date: Tue, 26 May 2020 00:36:54 +0200 Subject: [PATCH] cryptography: add signature of Prehashed (#4048) * cryptography: add signature of Prehashed * cryptography: modify signature of Prehashed mark internal attributes as undocumented add public attribute digest_size * cryptography: modify signature of Prehashed drop Optional from argument of __init__ --- .../hazmat/primitives/asymmetric/utils.pyi | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/third_party/2and3/cryptography/hazmat/primitives/asymmetric/utils.pyi b/third_party/2and3/cryptography/hazmat/primitives/asymmetric/utils.pyi index 136d270db..610a517f2 100644 --- a/third_party/2and3/cryptography/hazmat/primitives/asymmetric/utils.pyi +++ b/third_party/2and3/cryptography/hazmat/primitives/asymmetric/utils.pyi @@ -1,6 +1,16 @@ -from typing import Tuple +from typing import Optional, Tuple +from cryptography.hazmat.primitives.hashes import HashAlgorithm + def decode_dss_signature(signature: bytes) -> Tuple[int, int]: ... + + def encode_dss_signature(r: int, s: int) -> bytes: ... -class Prehashed(object): ... + +class Prehashed(object): + _algorithm: HashAlgorithm # undocumented + _digest_size: int # undocumented + def __init__(self, algorithm: HashAlgorithm) -> None: ... + + digest_size: int