Hashing in Python: Using Hashlib Library for Secure Hashing
ฝัง
- เผยแพร่เมื่อ 24 มี.ค. 2023
- Today we learn how to do hashing in Python using hashlib.
◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾
📚 Programming Books & Merch 📚
🐍 The Python Bible Book: www.neuralnine.com/books/
💻 The Algorithm Bible Book: www.neuralnine.com/books/
👕 Programming Merch: www.neuralnine.com/shop
🌐 Social Media & Contact 🌐
📱 Website: www.neuralnine.com/
📷 Instagram: / neuralnine
🐦 Twitter: / neuralnine
🤵 LinkedIn: / neuralnine
📁 GitHub: github.com/NeuralNine
🎙 Discord: / discord
🎵 Outro Music From: www.bensound.com/ - วิทยาศาสตร์และเทคโนโลยี
This tutorial is very clear and concise - and no fluff. You are a go to resource whenever I need to quickly learn any new concept!
I wanted a create a cool little software for my PhD research, which automatically fetches data from a few external databases. Then I realized I would need to just enter my password into the script itself, so I decided to write a simple encryption script to encrypt said plain text password. THEN I realized it's stupidly easy to crack, so I scrambled the order of the encrypted password with a scrambling key and found it to be pretty easy to crack too, since the key is stored locally. Now I've reached the point that I'm studying about hashing, salting and peppering and found my way here, even though my field of study has NOTHING to do with cryptography or computer sciences.
Man, what a journey, and all in the span of like two hours.
These videos are worth gold. 👌🏻🙏🏻
Thank You for making my work easy by giving better explanation about hashing. God bless you! Keep it up!
Thank you, very useful content
This is really good, would you ever make a follow up video to include salting hashes?
clear, simple and easy to understand
Thanks great video!!!
great video thanks a lot.
Very neat explanation....
This help me alot thank you
Thank you ! 😉
Know how to compare 2 hashes ?, please help me
Why do you not have a udemy course?
@@1-hasame here!
good material ;)
thank youuu
Everything - coll searching app!
tnks
Thanks big dog!
For verifying files, couldn't the checksum / SHA256 file also be changed to match the malicious program? Is that a more difficult thing to fake? It seems that if you're being targeted, it'd be easy to alter a text file if you can change what .exe they're downloading.
Of course you need to make sure that the checksum you are comparing against is legit. It has to come from a trusted source. But then, changing the program so that it somehow ends up producing the same checksum, even though it has different code, is virtually impossible.
Does anyone knows how to hash a hex value instead of a string?
How did you get the correct_hash value? where is it in a download website?
If its a password, isn't encryption the better choice? Or both.
I want a secure hash of files of arbitrary size. I'm not finding a lot of help.
encryption is designed to be reversed. hashing is a one way function that cannot be reversed. If you do not intend to reverse it, then you should use a one way function.
Maybe you can make a video about Java's hashCode method that is inside Object class :)
video foda
very confusing
bro calls python pythin 👽👽💀💀
Thank you very much
``import hashlib
with open('Sample.txt', 'rb') as f:
f.seek(0)
print(hashlib.file_digest(f, 'sha256').hexdigest())
f.seek(0)
print(hashlib.sha256(f.read()).hexdigest())``
whats this mean explain please
@@abdullahfall1517 f.seek(0): This line resets the file's position back to the beginning so that we can read the file content again
@@KhalilYasser oh, is that why you do it twice. thank you bro