I wrote a program that hash the number 1 to 9999 and puts it in the "key number", then opens a CSV file and returns the hashed numbers hashed the "key number" dictionary.
import csv
from hashlib import sha256
key_num = {}
for num in range(1,10000):
d = sha256(b'%i'% num).hexdigest()
key_num[d] = num
with open('D:/iliya/users password.csv') as f:
r = csv.reader(f)
for row in r :
name = row[0]
for grade in row[1:]:
key = grade
print(name,key_num[key])
Why does "b" appear in "sha256 (b '% i'% num) .hexdigest ()"?