Added UserExtensions

This commit is contained in:
2025-02-23 12:28:49 -05:00
parent cf9abbe494
commit 2b29be9882
4 changed files with 44 additions and 5 deletions

View File

@@ -25,6 +25,8 @@ using System.Data;
using MarketData.Generator.MovingAverage;
using MarketData.Generator.MGSHMomentum;
using MarketData.Security;
using MarketData.MarketDataModel.User;
using MarketData.Extensions;
namespace MarketData
{
@@ -989,11 +991,27 @@ namespace MarketData
Trace.Listeners.Add(new TextWriterTraceListener(strLogFile));
DateTime currentDate=DateTime.Now;
//String salt= default;
//String hash = default;
// (String salt, String hash)= Encryption.HashPasswordWithSalt("MN5191306");
// bool result = Encryption.VerifyPassword("MN5191306", salt, hash);
//User user = UserDA.GetUser("sean");
//if(!user.Verify("MN5191306"))
//{
// MDTrace.WriteLine(LogLevel.DEBUG,$"User {user.Username} was not verified");
//}
//else
//{
// MDTrace.WriteLine(LogLevel.DEBUG,$"User {user.Username} was verified");
//}
//(String salt, String hash) = Encryption.HashPasswordWithSalt("MN5191306");
//bool result = Encryption.VerifyPassword("MN5191306", salt, hash);
//User user = new User();
//user.Username="Sean";
//user.Salt=salt;
//user.Hash=hash;
//UserDA.AddUser(user);
DateTime maxHolidayDate =HolidayDA.GetMaxHolidayDate();