find a location for property in a new city

Thursday, 8 September 2011

MD5 encryption in .NET

There is not set up needed for this one.

MD5 hash encryption

public static string Md5Encryption(string dataToEncrypt)
{
    var bytes = Encoding.Default.GetBytes(dataToEncrypt);
    using (var md5 = new MD5CryptoServiceProvider())
    {
        var cipher = md5.ComputeHash(bytes);
        return Convert.ToBase64String(cipher);
    }
}

Follow britishdev on Twitter

22 comments:

  1. hi, i am new in security concepts of .net.

    But i want to learn it

    Your articles are great but i got problem to decrypt the string that has been encrypted by MD5.

    Could you also post this how could i decrypt the string that is encrypted by MD5

    ReplyDelete
  2. You cannot decrypt MD5 hashes. It is one way encryption. You'd want RSA or Triple DES (or something else) if you want encryption and decryption

    ReplyDelete
  3. Thanks for this information, it was very helpful. Keep up the good work.
    pgp desktop

    ReplyDelete
  4. There are many different types of encryption used in security of the computers but one that is most strong and efficient is the MD5 Hash. Don't ever forget to include a reference to 'System.Security.Cryptography' in your project, it's a must.

    ReplyDelete
  5. Motifz Designer Lawn. 1, 2 & 3 Piece Unstitched Premium Embroidered Lawn 2019, Premium embroidered Lawn, Premium lawn, Premium lawn 2019, Motifz, Premium lawn in Pakistan. Shipping worldwide. Stitching option available.

    ReplyDelete
  6. Buy online wholesale printed custom cbd boxes and packaging at easy prices and shipping worldwide, with 24/7 customer support. Get a free custom quote now!!

    ReplyDelete
  7. Blackbird packaging provide you with any size, shape design, cbd boxes sooner than any other packaging competitor in the market

    ReplyDelete
  8. Blackbird packaging provide you with any size, shape design, custom cookie boxes wholesale sooner than any other packaging competitor in the market

    ReplyDelete
  9. By creating your own Christmas images, you can personalize the gifts you give and spread a sense of happiness all year long. Merry Christmas 2020 Greetings You can give something meaningful to someone you care about in a way that is both unique and personal.

    ReplyDelete
  10. buy bath bomb packaging online from blackbird packaging at best prices. get free shiping

    ReplyDelete
  11. Blackbird packaging company can provide you with any size, shape design, and custom cookie boxes sooner than any other packaging competitor in the market

    ReplyDelete
  12. We at Al-Fatah have perfected the floor care with the right variety of Vacuum Cleaners online available under one roof. Al-Fatah is a One-Stop Shop for all your home appliances buying needs. Buy best variety of Vacuum Cleaners in Pakistan at Al-Fatah. Shop Vacuum Cleaners of Top & Genuine Brands in Pakistan at Al-Fatah now!

    ReplyDelete
  13. Shop electronics online Goods at Al-Fatah, Pakistan’s leading chain of departmental stores. Shop from a huge range of top brands Home Appliances, Smart-tech and Phones and Sound bars from Al-Fatah. Shop from huge range of electronics available at Al-Fatah. Avail Free Delivery on orders above 1000 PKR in selected cities.

    ReplyDelete
  14. Blackbird packaging provide you with any size, shape design, vape cartridge packaging sooner than any other packaging competitor in the market

    ReplyDelete
  15. Blackbird packaging provide you with any size, shape design, cookie packaging boxes sooner than any other packaging competitor in the market

    ReplyDelete
  16. Blackbird packaging provide you with any size, shape design, custom essential oil boxes sooner than any other packaging competitor in the market

    ReplyDelete
  17. Buy leggings for girls online from Dshred at easy prices delivered at your doorstep. Get free shipping

    ReplyDelete
  18. Buy shorts men from ndure at best prices delivered at your doorstep. Get free shipping

    ReplyDelete
  19. Buy [b][url=https://dshred.com/collections/shirts-tops]best t shirts for men[/url][/b] online dshred at best prices delivered at your doorstep. Get free shipping

    ReplyDelete
  20. Buy t shirt for men online from dshred at best prices delivered at your doorstep. Get free shipping

    ReplyDelete
  21. Buy men watches online from Al-Fatah at best prices delivered at your doorstep. Get free shipping

    ReplyDelete
  22. Great post! you deliver thee best information related to security. You discuss MD5 encryption in net in detail. This post is very helpful for IT professionals. Furthermore, Doors installation and repair services in CT present the best door installation services at affordable price at any time at any place.

    ReplyDelete