Need Help Verifying A Signature With The Python Cryptography Library
I'm trying to verify a signature using the Python Cryptography library as stated here https://cryptography.io/en/latest/hazmat/primitives/asymmetric/rsa/ This is in the context of
Solution 1:
verify raises an exception or returns None. Accordingly, this code
if verifier.verify():
return1else:
return0will always return 0 even though in reality the verification check has passed. You are correct that the proper way to use verify is to wrap it in a try block and handle the InvalidSignature exception in the event of failure.
Post a Comment for "Need Help Verifying A Signature With The Python Cryptography Library"