formalised project structure

This commit is contained in:
Emile Clark-Boman 2025-06-21 19:05:47 +10:00
parent 897272d7c1
commit 6f8a7322f2
14 changed files with 177 additions and 71 deletions

15
bcrypt/hash/og.py Normal file
View file

@ -0,0 +1,15 @@
'''
The unchanged original "bcrypt" function for the CTF (by bpaul)
'''
def bcrypt(x: bytes) -> int:
h = 18446744073709551614
for (i, b) in enumerate(x):
h *= h * (b + 1)
k = 59275109328752 * (i + 1)
for j in range(8):
k ^= b << (j * j)
h += k
h %= (2 ** 64)
return h