Hash256, password
Hi.I have a task to access some password which its algorithm is given in a csv file with name. Such as this: Daniel,99b057c8e3461b97f8d...... And i have to put the code in a fuction and only use these 2 libraries: Csv and sha256 And because the code is being checked by a system and gives me a grade, i can't change the main structure.please check if i got it import csv from hashlib import sha256 def hash_password_hack(input_file_name, output_file_name): hash_password_to_password = {} with open(input_file_name, newline='') as f: psswords_singer = csv.reader(h) with open(output_file_name, 'w', newline='') as f: writer = csv.writer(w, delimiter=',') for password in range(1000,10000): hashing_number = sha256(b'%i'% password).hexdigest() hash_password_to_password[hashing_number] = password for row in psswords_singer: name_users = row[0] for key in row[1:] : writer.writerow([name_users,hash_password_to_password[key]])