Skip to content
This repository has been archived by the owner on Jul 21, 2024. It is now read-only.

Commit

Permalink
Updated Encrypt() method (#310)
Browse files Browse the repository at this point in the history
  • Loading branch information
lpeyr committed Apr 3, 2022
1 parent 6c68cac commit ce8a5d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions LeoCorpLibrary/Crypt.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ public static string Encrypt(string source, string key)
throw new ArgumentNullException(nameof(source), "The string cannot be null.");
}

using (TripleDESCryptoServiceProvider tripleDESCryptoService = new TripleDESCryptoServiceProvider())
using (var tripleDESCryptoService = TripleDES.Create())
{
using (MD5CryptoServiceProvider hashMD5Provider = new MD5CryptoServiceProvider()) // Create MD5CryptoServiceProvider
using (var hashMD5Provider = MD5.Create()) // Create MD5CryptoServiceProvider
{
byte[] byteHash = hashMD5Provider.ComputeHash(Encoding.UTF8.GetBytes(key));
tripleDESCryptoService.Key = byteHash;
Expand Down

0 comments on commit ce8a5d3

Please sign in to comment.