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

16 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. 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
  7. buy bath bomb packaging online from blackbird packaging at best prices. get free shiping

    ReplyDelete
  8. 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
  9. Buy leggings for girls online from Dshred at easy prices delivered at your doorstep. Get free shipping

    ReplyDelete
  10. 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
  11. Buy t shirt for men online from dshred at best prices delivered at your doorstep. Get free shipping

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

    ReplyDelete
  13. 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
  14. From Ndure buy online the latest fashion track suits for girls online at affordable price. Fast Shipping.

    ReplyDelete
  15. When packing for a move, sooner or later you’ll get to packing a few cables here and there in the residence. In maximum cases, the ones cables can be electricity cords of digital devices and electric household home equipment but you’ll additionally get to packing connection cables of diverse peripheral devices, and extension cords as nicely. Click Here for more Details:
    Out of State Movers

    ReplyDelete
  16. This 12 months Andhra Pradesh Women Development and Child Welfare for Teacher & Aya vacancies Recruitment system anticipated to be entire within schedule. ICDS AP Anganwadi Teacher & Aya Application & Notification available at wdcw.Ap.Gov.In. Also take a look at present day sarkari jobs before applying for ICDS AP Anganwadi Teacher & Aya jobs.

    ap govt jobs

    ReplyDelete