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/
  • Наука та технологія

КОМЕНТАРІ • 36

  • @shaddwatson2673
    @shaddwatson2673 8 місяців тому +7

    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!

  • @Ruostesieni
    @Ruostesieni 9 місяців тому +5

    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.

  • @deleted7023
    @deleted7023 Рік тому +7

    These videos are worth gold. 👌🏻🙏🏻

  • @KunalsinhSolanki
    @KunalsinhSolanki 23 дні тому

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

  • @iwonaholoven5651
    @iwonaholoven5651 Рік тому +2

    Thank you, very useful content

  • @nanoic2964
    @nanoic2964 9 місяців тому +2

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

  • @Ismail_kabir
    @Ismail_kabir 2 місяці тому

    clear, simple and easy to understand

  • @yiannisnik-ew2hs
    @yiannisnik-ew2hs Рік тому +1

    Thanks great video!!!

  • @naderbazyari2
    @naderbazyari2 Рік тому +1

    great video thanks a lot.

  • @Abhishekverma-ip7yx
    @Abhishekverma-ip7yx Рік тому

    Very neat explanation....

  • @acekiku5848
    @acekiku5848 5 місяців тому

    This help me alot thank you

  • @sennlich
    @sennlich 5 місяців тому

    Thank you ! 😉

  • @Ramsey.001
    @Ramsey.001 10 місяців тому +1

    Know how to compare 2 hashes ?, please help me

  • @saadhamid5609
    @saadhamid5609 Рік тому +8

    Why do you not have a udemy course?

  • @kacperm2909
    @kacperm2909 5 місяців тому

    good material ;)

  • @wh00ana
    @wh00ana 11 місяців тому

    thank youuu

  • @adamfatyga7977
    @adamfatyga7977 10 місяців тому

    Everything - coll searching app!

  • @pourix21
    @pourix21 Рік тому

    tnks

  • @prompt_shark
    @prompt_shark Рік тому

    Thanks big dog!

  • @ATCraiger
    @ATCraiger 5 місяців тому

    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.

    • @NeuralNine
      @NeuralNine  5 місяців тому

      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.

  • @zaphkiel3334
    @zaphkiel3334 9 місяців тому

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

  • @hibamallouhi2735
    @hibamallouhi2735 9 місяців тому +1

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

  • @oneeyedphotographer
    @oneeyedphotographer 5 місяців тому

    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.

    • @GutsToCuts
      @GutsToCuts 4 місяці тому

      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.

  • @oguzhantopaloglu9442
    @oguzhantopaloglu9442 Рік тому +2

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

  • @Miguel-jo1jt
    @Miguel-jo1jt Рік тому

    video foda

  • @kanchungtsang1401
    @kanchungtsang1401 Рік тому

    very confusing

  • @xkisses92
    @xkisses92 Рік тому +1

    bro calls python pythin 👽👽💀💀

  • @KhalilYasser
    @KhalilYasser Рік тому

    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())``

    • @abdullahfall1517
      @abdullahfall1517 Рік тому

      whats this mean explain please

    • @KhalilYasser
      @KhalilYasser Рік тому +1

      @@abdullahfall1517 f.seek(0): This line resets the file's position back to the beginning so that we can read the file content again

    • @abdullahfall1517
      @abdullahfall1517 Рік тому

      @@KhalilYasser oh, is that why you do it twice. thank you bro