Question

Please, No Plagiarism Must be in your own words. Design a hash function that uses any...

Please, No Plagiarism Must be in your own words.

Design a hash function that uses any desired date as the salt. Demonstrate the operation of the function, including input values. Describe the benefits and shortcomings of the hash function.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

In case of any doubt please comment, I am happy to assist you.

Please do rate my answer if you like it.

Coded in python:

Output:

CODE to COPY:

import hashlib
# function
def hash_function(string,salt):
hash_value=hashlib.sha256(string.encode()).hexdigest()
saltedresult= hash_value+salt
return saltedresult
#Ask details from user
yyyy = str(input("Enter year: "))
mm = str(input("Enter month: "))
dd=str(input("Enter date: "))
password= str(input("Enter the value which needs to be converted to salt"))
salt = dd+mm+yyyy

print(hash_function(password,salt))

Benefits and shortcomings of hashing are:

Hashing is a cryptographic technique which we use to store passwords. Very simple to use and understand.

1. Hashing is a non-reversal process

2. Hashing provides best-improvised security and it is constant

3. It maintains integrity and Authenticity of data

Thank you, Have a great day:-)


Add a comment
Know the answer?
Add Answer to:
Please, No Plagiarism Must be in your own words. Design a hash function that uses any...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT