Add hashing and other security features #12
@ -1,11 +1,12 @@
|
|||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
using Mirea.Api.Security.Services;
|
||||||
|
|
||||||
namespace Mirea.Api.Security;
|
namespace Mirea.Api.Security;
|
||||||
|
|
||||||
public static class DependencyInjection
|
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 saltSize = int.Parse(configuration["SECURITY_SALT_SIZE"]!);
|
||||||
var hashSize = int.Parse(configuration["SECURITY_HASH_SIZE"]!);
|
var hashSize = int.Parse(configuration["SECURITY_HASH_SIZE"]!);
|
||||||
|
@ -3,7 +3,7 @@ using System;
|
|||||||
using System.Buffers.Text;
|
using System.Buffers.Text;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace Mirea.Api.Security;
|
namespace Mirea.Api.Security.Services;
|
||||||
|
|
||||||
public class PasswordHashService
|
public class PasswordHashService
|
||||||
{
|
{
|
Loading…
Reference in New Issue
Block a user