From 6029ea3c2cc20ebfa1958ce5524d5db83b82e25a Mon Sep 17 00:00:00 2001 From: Polianin Nikita Date: Wed, 29 May 2024 04:11:04 +0300 Subject: [PATCH] refactor: move hashing to services --- Security/DependencyInjection.cs | 3 ++- Security/{ => Services}/PasswordHashService.cs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) rename Security/{ => Services}/PasswordHashService.cs (98%) diff --git a/Security/DependencyInjection.cs b/Security/DependencyInjection.cs index 4dbab98..39e113a 100644 --- a/Security/DependencyInjection.cs +++ b/Security/DependencyInjection.cs @@ -1,11 +1,12 @@ using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; +using Mirea.Api.Security.Services; namespace Mirea.Api.Security; public static class DependencyInjection { - public static IServiceCollection AddApplicationServices(this IServiceCollection services, IConfiguration configuration) + public static IServiceCollection AddSecurityServices(this IServiceCollection services, IConfiguration configuration) { var saltSize = int.Parse(configuration["SECURITY_SALT_SIZE"]!); var hashSize = int.Parse(configuration["SECURITY_HASH_SIZE"]!); diff --git a/Security/PasswordHashService.cs b/Security/Services/PasswordHashService.cs similarity index 98% rename from Security/PasswordHashService.cs rename to Security/Services/PasswordHashService.cs index 9ea24b3..b9cc41c 100644 --- a/Security/PasswordHashService.cs +++ b/Security/Services/PasswordHashService.cs @@ -3,7 +3,7 @@ using System; using System.Buffers.Text; using System.Text; -namespace Mirea.Api.Security; +namespace Mirea.Api.Security.Services; public class PasswordHashService {