I have a little code that takes a user input and encrypts it. It's not a hash formula but its just a simple enigma code. the code simplified is:
def Hash (string):
for x in range(0, len(string)):
if x == 0:
HashC = str(ord(string[x:x+1]))
else:
HashC = HashC+str(ord(string[x:x+1]))
print(HashC)
U = HashC
U = input("What do you want to hash? ")
Hash(U)
print(U)
The output with the print so show me whats going on in the conversion.
> What do you want to hash? Test
> 84101
> 84101115
> 84101115116
> Test
What I want it to Output
> What do you want to hash? Test
> 84101
> 84101115
> 84101115116
> 84101115116
Because I want the code to change the string into the "encrypted" code.