Question: Task: Create a function in Python named salted_password. The function should take in two parameters: Password Chosen By User Salt - This is normally generated
Task:
Create a function in Python named salted_password. The function should take in two parameters:
-
Password Chosen By User
-
Salt - This is normally generated by this code but for this exercise it will be passed to your function: os.urandom(32).hex()
Your function should append the Salt to the password and hash with the SHA256 function from the hashlib Python module and return the result.
Hi! I'm taking classes in Cyber Security. I have some basic knowledge in Python but unfortunately this is a drop into the cold water as I have never hashed a Password before. While I know how to create a function like >>> def salted_password and do the import like >>> from hashlib import sha256, I struggle with defining the parameters, especially number
2 - Salt and os.urandom(32).hex()
Thanks for any hint in the right direction! If this has already been resolved please may I ask you to send me the link. Thank you.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
