Please help with my code .How do I stop it from calling the function rather it should just have the function definition | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Please help with my code .How do I stop it from calling the function rather it should just have the function definition

import hashlib import os print ("Enter your Password:") UserChosen = input() print ("User Password is : "+ UserChosen) salt =os.urandom(32).hex() print("Salt Password is : "+ salt) def salted_password(x, y): appended = UserChosen + salt result = hashlib.sha256(appended.encode()) hashed = result.hexdigest() return hashed print("Hashed Password is : ") print(salted_password(UserChosen,salt

20th Jun 2021, 9:55 AM
Kanyisa
2 Answers
0
Well first of all I see some unfinished lines and second of all just dont call the function.. it's only called when you call it like functionname(args)..
23rd Jun 2021, 11:28 PM
Noah
Noah - avatar
0
Thanks for the feedback
24th Jun 2021, 7:33 PM
Kanyisa