code: def verify_hash(self, hashed_data, compare_data):
          
          return self.security.hashing_context.verify(
              encode_string(compare_data), hashed_data)
docs: Verify a hash in the security token hashing context.