@@ -64,14 +64,14 @@ def verify(self, message, signature):
6464 if len (sig_bytes ) != self ._r_s_size * 2 :
6565 return False
6666 r = (
67- int .from_bytes (sig_bytes [:self ._r_s_size ], byteorder = "big" )
67+ int .from_bytes (sig_bytes [: self ._r_s_size ], byteorder = "big" )
6868 if _helpers .is_python_3 ()
69- else utils .int_from_bytes (sig_bytes [:self ._r_s_size ], byteorder = "big" )
69+ else utils .int_from_bytes (sig_bytes [: self ._r_s_size ], byteorder = "big" )
7070 )
7171 s = (
72- int .from_bytes (sig_bytes [self ._r_s_size :], byteorder = "big" )
72+ int .from_bytes (sig_bytes [self ._r_s_size :], byteorder = "big" )
7373 if _helpers .is_python_3 ()
74- else utils .int_from_bytes (sig_bytes [self ._r_s_size :], byteorder = "big" )
74+ else utils .int_from_bytes (sig_bytes [self ._r_s_size :], byteorder = "big" )
7575 )
7676 asn1_sig = encode_dss_signature (r , s )
7777
@@ -154,9 +154,15 @@ def sign(self, message):
154154 # Convert ASN1 encoded signature to (r||s) raw signature.
155155 (r , s ) = decode_dss_signature (asn1_signature )
156156 return (
157- (r .to_bytes (self ._r_s_size , byteorder = "big" ) + s .to_bytes (self ._r_s_size , byteorder = "big" ))
157+ (
158+ r .to_bytes (self ._r_s_size , byteorder = "big" )
159+ + s .to_bytes (self ._r_s_size , byteorder = "big" )
160+ )
158161 if _helpers .is_python_3 ()
159- else (utils .int_to_bytes (r , self ._r_s_size ) + utils .int_to_bytes (s , self ._r_s_size ))
162+ else (
163+ utils .int_to_bytes (r , self ._r_s_size )
164+ + utils .int_to_bytes (s , self ._r_s_size )
165+ )
160166 )
161167
162168 @classmethod
@@ -200,4 +206,4 @@ def __setstate__(self, state):
200206
201207
202208class ES256Signer (EsSigner ):
203- pass
209+ pass
0 commit comments