Hashing in Python: Using Hashlib Library for Secure Hashing

preview_player
Показать описание
Today we learn how to do hashing in Python using hashlib.

◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾
📚 Programming Books & Merch 📚

🌐 Social Media & Contact 🌐

Рекомендации по теме
Комментарии
Автор

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!

shaddwatson
Автор

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.

Ruostesieni
Автор

Thank You for making my work easy by giving better explanation about hashing. God bless you! Keep it up!

KunalsinhSolanki
Автор

This is really good, would you ever make a follow up video to include salting hashes?

nanoic
Автор

Know how to compare 2 hashes ?, please help me

Ramsey.
Автор

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.

ATCraiger
Автор

Does anyone knows how to hash a hex value instead of a string?

zaphkiel
Автор

How did you get the correct_hash value? where is it in a download website?

hibamallouhi
Автор

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.

oneeyedphotographer
Автор

Maybe you can make a video about Java's hashCode method that is inside Object class :)

oguzhantopaloglu
Автор

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)

KhalilYasser