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?

    • @indorexian
      @indorexian ปีที่แล้ว +1

      ​@@1-hasame here!

  • @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