def verify(self, byts, sign):
        '''
        Verify the signature for the given bytes using the ECC
        public key.

        Args:
            byts (bytes): The data bytes.
            sign (bytes): The signature bytes.

        Returns:
            bool: True if the data was verified, False otherwise.
        '''
        try:
            chosen_hash = c_hashes.SHA256()
            hasher = c_hashes.Hash(chosen_hash, default_backend())
            hasher.update(byts)
            digest = hasher.finalize()
            self.publ.verify(sign,
                             digest,
                             c_ec.ECDSA(c_utils.Prehashed(chosen_hash))
                             )
            return True
        except InvalidSignature:
            logger.exception('Error in publ.verify')
            return False
def verify ( self , byts , sign ) : try : chosen_hash = c_hashes . SHA256 ( ) hasher = c_hashes . Hash ( chosen_hash , default_backend ( ) ) hasher . update ( byts ) digest = hasher . finalize ( ) self . publ . verify ( sign , digest , c_ec . ECDSA ( c_utils . Prehashed ( chosen_hash ) ) ) return True except InvalidSignature : logger . exception ( 'Error in publ.verify' ) return False
Verify the signature for the given bytes using the ECC
        public key.

        Args:
            byts (bytes): The data bytes.
            sign (bytes): The signature bytes.

        Returns:
            bool: True if the data was verified, False otherwise.