use better hash method
This commit is contained in:
@@ -41,7 +41,11 @@ public static class Helpers
|
||||
var dateTime = DateTime.UtcNow.ToString("yyyyMMddHHmmssfffffff");
|
||||
var type = typeof(T).ToString();
|
||||
var together = sn + dateTime + type + var;
|
||||
var hash = BitConverter.ToString(new HMACMD5().ComputeHash(Encoding.Default.GetBytes(together))).Replace("-", string.Empty);
|
||||
#if NET5_0_OR_GREATER
|
||||
var hash = BitConverter.ToString(MD5.HashData(Encoding.Default.GetBytes(together))).Replace("-", string.Empty);
|
||||
#else
|
||||
var hash = BitConverter.ToString(MD5.Create().ComputeHash(Encoding.Default.GetBytes(together))).Replace("-", string.Empty);
|
||||
#endif
|
||||
return hash;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<Version>2.1.1</Version>
|
||||
<Version>2.1.2</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,20 +1,6 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
/* Nicht gemergte Änderung aus Projekt "Pilz.Cryptography (net6.0)"
|
||||
Vor:
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Security.Cryptography;
|
||||
using System.IO;
|
||||
Nach:
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
*/
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user