PasswordHasher added

This commit is contained in:
2026-01-13 02:47:09 +01:00
Unverified
parent 03e28c6681
commit 2b3650de1a
6 changed files with 30 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
using TimetableDesigner.Backend.Services.Authentication.Application.Commands.Register;
using TimetableDesigner.Backend.Services.Authentication.DTO.API;
namespace TimetableDesigner.Backend.Services.Authentication.DTO.Mappers;
public static class RegisterMappers
{
public static RegisterCommand ToCommand(this RegisterRequest request) =>
new RegisterCommand(request.Email, request.Password);
}

View File

@@ -0,0 +1,7 @@
namespace TimetableDesigner.Backend.Services.Authentication.Application.Helpers;
public interface IPasswordHasher
{
PasswordHashData CreateHash(string password);
byte[] ComputeHash(string password, string salt);
}

View File

@@ -0,0 +1,7 @@
namespace TimetableDesigner.Backend.Services.Authentication.Application.Helpers;
public record PasswordHashData(
byte[] Hash,
string LeftSalt,
string RightSalt
);

View File

@@ -0,0 +1,6 @@
namespace TimetableDesigner.Backend.Services.Authentication.Application.Helpers;
public class PasswordHasher
{
}