Last active
November 1, 2018 07:09
-
-
Save gaxiiiiiiiiiiii/6c1d49c0e01da5b0dd155780690db63c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def search(self, data): | |
target = None | |
hash_value = sha256(data.encode()).hexdigest() | |
for node in self.leaves: | |
if node.hash == hash_value: | |
target = node | |
return target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment