C# How To MD5 Hash a File And Show Progress

Поділитися
Вставка
  • Опубліковано 21 гру 2024

КОМЕНТАРІ • 32

  • @jonweinraub
    @jonweinraub 4 роки тому +2

    Nicely done! Really enjoyed this tutorial. I see the link no longer works, but I can just type it up, as better to learn this way anyway, and like to add additional functionality, and think this is a good starting point to play around with hashing digests. Thank you for sharing! Pretty amazing almost eight years later, this video is still very much relevant! Kudos mate!
    Though why did you put X2 you could have had put : hash.Append(b.ToString("x2")); and you can skip the ToLower method :-)

  • @BetterCoder
    @BetterCoder  11 років тому +1

    You're so welcome! This is why I made this video too! I was searching and searching, and eventually gave up and created my own :P

  • @evancheta6035
    @evancheta6035 4 роки тому

    Good day, what if you are going to convert all the files in a directory. would this could still be of use?

  • @memonicjonny4447
    @memonicjonny4447 10 років тому +1

    Thank you so much!
    This helped me to make an antivirus which uses MD5 hash finding.
    And i done it!
    Only this video helped me, thank you again for your work.

  • @charlynlow09
    @charlynlow09 9 років тому

    It works! Thank you so much for this tutorial! It totally worked after watching your tutorial, others didn't really work

  • @rahimansari7014
    @rahimansari7014 5 років тому

    Awesome Explanation God bless the people like you Better than my University teacher Thanks man

  • @sreeniv09
    @sreeniv09 4 роки тому

    HOw can i use this for computing for a file online? I mean file path with https...

  • @BetterCoder
    @BetterCoder  11 років тому

    @eng deaa Actually the first line of the description is a link to the source code. You can get it there.

  • @amna6916
    @amna6916 4 роки тому

    I can't declare the progress Bar1 why ❓ please help

  • @HitEmUpru
    @HitEmUpru 9 років тому +2

    Hi man, pease update the source code, link is dead.

    • @mayd1312
      @mayd1312 5 років тому

      I'm not the the author of the video but here is the uploaded code.
      github.com/MehdiBela/BetterCoderMD5HashProgress

  • @rubeushagrid4131
    @rubeushagrid4131 7 років тому

    why did u write "X2" in hash.Append(b.tostring("X2".toupper())); ? what does x2 denotes here ? what meaning does it hold ?

  • @daerlnaxe
    @daerlnaxe 6 років тому

    Very very good you saved my life, i didn't find a code for sha256

  • @EmanMarcaida
    @EmanMarcaida 5 років тому

    Anyone knows any tutorial on making SHA-1 from file with progress?

    • @jonweinraub
      @jonweinraub 4 роки тому

      Just adapt it, from the MSDN:
      System.Security.Cryptography.MD5
      System.Security.Cryptography.RIPEMD160
      System.Security.Cryptography.SHA1
      System.Security.Cryptography.SHA256
      System.Security.Cryptography.SHA384
      System.Security.Cryptography.SHA512

  • @monalisa3299
    @monalisa3299 6 років тому

    Hi man, please update the souce code link... it is already dead, thanks in advance.

  • @ivandrofly
    @ivandrofly 10 років тому +2

    Thank you... You could use ToString("x2") with lower 'x' without calling the to ToLower(). ;)
    GOOD STUFF

    • @BetterCoder
      @BetterCoder  10 років тому +1

      Oh wow, that totally makes sense, but I never thought of that. Thanks!

    • @ivandrofly
      @ivandrofly 10 років тому

      BetterCoder one question: by saying
      hasher.TransformBlock(buffer, 0, bytesRead, null, 0);
      will hasher store the transformed bytes into hasher.Hash properties or ...?

    • @BetterCoder
      @BetterCoder  10 років тому

      Ivandro Ismael Well, you will still need to call TransformFinalBlock() before you can get the byte[] from .Hash

    • @ivandrofly
      @ivandrofly 10 років тому

      BetterCoder yeah, but I'm what I'm confused with is every time you call TransformBlock(..) will the read bytes get stored in hash.Hash?
      'Cause tiny.cc/k9mmhx said: "input byte array to the specified region of the output byte array."
      why aren't the second byte param required

  • @mgh256
    @mgh256 6 років тому

    Thank you very much . If possible i would send you garland of flowers.

  • @linadev4963
    @linadev4963 11 років тому

    Thank so much man , do u know u safe us we 3 developers and we got task to do md5 hasher , and we did not have any idea how to it , we was looking in all web we could not find and good tutorial , we Thankkkkkkkkkkkkk you so mucccccccccccccchhhhhhhhhhhhhh

  • @BetterCoder
    @BetterCoder  11 років тому

    Thank you! :) Hopefully it's useful to you

  • @engdeaa5448
    @engdeaa5448 11 років тому

    could u plz put the hole code as comment :) thanks very much huge work :)

  • @marceloxsweet1358
    @marceloxsweet1358 5 років тому

    buffer = new byte[8192]; .... ? ( 2^13)

  • @mayd1312
    @mayd1312 6 років тому

    For those interested in getting the source code, I reuploaded it at this address:
    github.com/MehdiBela/BetterCoderMD5HashProgress

  • @odonnaghan
    @odonnaghan 10 років тому

    Thank you!

  • @piroozenikname349
    @piroozenikname349 6 років тому

    hi thank you . very good

  • @BetterCoder
    @BetterCoder  11 років тому

    Yeahhhhhhhh!

  • @semuhphor
    @semuhphor 7 років тому

    Thanks!

  • @_MauricioTellez
    @_MauricioTellez 11 років тому

    webbbbbb