'Verifies a given message.'

def Verify(self, message, signature, hash_algorithm=None):

    if (hash_algorithm is None):
        hash_algorithm = hashes.SHA256()
    for padding_algorithm in [padding.PSS(mgf=padding.MGF1(hash_algorithm), salt_length=padding.PSS.MAX_LENGTH), padding.PKCS1v15()]:
        try:
            verifier = self._value.verifier(signature, padding_algorithm, hash_algorithm)
            verifier.update(message)
            verifier.verify()
            return True
        except exceptions.InvalidSignature as e:
            pass
    raise VerificationError(e)
