0

What library do i use to encrypt (with des, aes and md5) in .netcore?

Hello! I am trying to encrypt some data in C# in .NetCore but i do not have the right libraries. I can't find them. Can you please tell me some, if i want to use AES, MD5, and DES encryptions?

16th Jun 2017, 11:25 AM
Andrew Bratu
Andrew Bratu - avatar
1 Antwort
0
using System.Security.Cryptography; using System.Text; string Encrypt(string password) { MD5CryptoServiceProvider a = new MD5CryptoServiceProvider(); a.ComputeHash(Encoding.ASCII.GetBytes(password)); var result = a.Hash; var strBuilder = new StringBuilder(); for (int i = 0; i < result.Length; i++) strBuilder.Append(result[i].ToString("x2")); return strBuilder.ToString(); }
17th Sep 2017, 6:31 PM
Kacper Piotrowski
Kacper Piotrowski - avatar