mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-05-12 21:02:27 +00:00
Multiple changes to HashHelper and RandomHelper
- Renamed HashHelper to CryptoHelper - Moved CryptoHelper.GenerateRandomBytes to RandomHelper - Documented RandomHelper
This commit is contained in:
parent
396477c05d
commit
f31a73ccaa
22 changed files with 86 additions and 86 deletions
|
@ -19,12 +19,12 @@ public class CreateUserCommand : ICommand
|
|||
string onlineId = args[0];
|
||||
string password = args[1];
|
||||
|
||||
password = HashHelper.Sha256Hash(password);
|
||||
password = CryptoHelper.Sha256Hash(password);
|
||||
|
||||
User? user = await this._database.Users.FirstOrDefaultAsync(u => u.Username == onlineId);
|
||||
if (user == null)
|
||||
{
|
||||
user = await this._database.CreateUser(onlineId, HashHelper.BCryptHash(password));
|
||||
user = await this._database.CreateUser(onlineId, CryptoHelper.BCryptHash(password));
|
||||
Logger.Log($"Created user {user.UserId} with online ID (username) {user.Username} and the specified password.", LoggerLevelLogin.Instance);
|
||||
|
||||
user.PasswordResetRequired = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue