<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def verify_hash(self, hashed_data, compare_data):
 """ Verify a hash in the security token hashing context. """

        return self.security.hashing_context.verify(
            encode_string(compare_data), hashed_data)