KOSASIH / Galactic-Chain

Unexpected keyword argument in function call PYL-E1123
Bug risk
Critical
4 occurrences in this check
Unexpected keyword argument 'hash_func' in constructor call
27        verifier = public_key.verifier(
28            signature,
29            padding=ec.ECDSA(max_size=32).padding,
30            algorithm=ec.ECDSA(hash_func=hashlib.sha256),31        )
32        try:
33            verifier.verify(message.encode())
Unexpected keyword argument 'max_size' in constructor call
26    def verify(self, public_key, message, signature):
27        verifier = public_key.verifier(
28            signature,
29            padding=ec.ECDSA(max_size=32).padding,30            algorithm=ec.ECDSA(hash_func=hashlib.sha256),
31        )
32        try:
Unexpected keyword argument 'hash_func' in constructor call
18    def sign(self, private_key, message):
19        signer = private_key.signer(
20            padding=ec.ECDSA(max_size=32).padding,
21            algorithm=ec.ECDSA(hash_func=hashlib.sha256),22        )
23        signature = signer.sign(message.encode())
24        return signature
Unexpected keyword argument 'max_size' in constructor call
17
18    def sign(self, private_key, message):
19        signer = private_key.signer(
20            padding=ec.ECDSA(max_size=32).padding,21            algorithm=ec.ECDSA(hash_func=hashlib.sha256),
22        )
23        signature = signer.sign(message.encode())