Created
May 16, 2021 21:44
-
-
Save cvasqxz/0590abd64299d8151ead5fe6a545882f to your computer and use it in GitHub Desktop.
Hello World with SHA256 hash collision
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
from hashlib import sha256 | |
t = b'hola' | |
h = b'' | |
while not t in h: h = sha256(h).digest() | |
p = h.find(t) | |
print(h[p:p+len(t)].decode('utf-8')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment