erreur fix
continuous-integration/drone/push Build is passing Details

pull/15/head
Matheo THIERRY 2 years ago
parent f054b6c75d
commit f82b7bb9d7

@ -7,21 +7,6 @@ using System.Text;
using System.Security.Cryptography; using System.Security.Cryptography;
using System.Threading.Tasks; using System.Threading.Tasks;
static string GetSHA256Hash(string input)
{
using (SHA256 sha256Hash = SHA256.Create())
{
byte[] bytes = sha256Hash.ComputeHash(Encoding.UTF8.GetBytes(input));
StringBuilder builder = new StringBuilder();
for (int i = 0; i < bytes.Length; i++)
{
builder.Append(bytes[i].ToString("x2"));
}
return builder.ToString();
}
}
namespace Notus_Persistance namespace Notus_Persistance
{ {
@ -78,7 +63,7 @@ namespace Notus_Persistance
foreach (User user in database.GetUserList()) foreach (User user in database.GetUserList())
{ {
user.SetPassword(GetSHA256Hash(user.GetPassword())); user.SetPassword(user.GetPassword().GetHashCode().ToString());
} }
return database; return database;

Loading…
Cancel
Save