astral-api/Astral.Services/Options/PwdHashOptions.cs
2024-12-11 20:36:30 +00:00

37 lines
967 B
C#

// <copyright file="PwdHashOptions.cs" company="alveus.dev">
// Copyright (c) alveus.dev. All rights reserved. Licensed under the MIT License.
// </copyright>
namespace Astral.Services.Options;
/// <summary>
/// How the password should be hashed.
/// Refer to https://argon2-cffi.readthedocs.io/en/stable/argon2.html.
/// </summary>
public class PwdHashOptions
{
/// <summary>
/// Number of threads to use. (Higher the better).
/// </summary>
public int DegreeOfParallelism { get; set; }
/// <summary>
/// Number of iterations over the memory.
/// </summary>
public int NumberOfIterations { get; set; }
/// <summary>
/// Memory used by the algorithm.
/// </summary>
public int MemoryToUseKb { get; set; }
/// <summary>
/// Salt size in bytes.
/// </summary>
public int SaltSize { get; set; }
/// <summary>
/// Hash size in bytes.
/// </summary>
public int HashSize { get; set; }
}