mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 07:11:10 +00:00
Adds Infrastructure security hashing service
This commit is contained in:
1 parent
3725426aa7
commit
e73556e915
3 files changed
+108
-1
No files matched your search
@@ -0,0 +1,22 @@
|
||||
namespace Lumina.Application.Common.Infrastructure;
|
||||
|
||||
/// <summary>
|
||||
/// Interface for the service for hashing passwords.
|
||||
/// </summary>
|
||||
public interface IHashService
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates a hash from a string.
|
||||
/// </summary>
|
||||
/// <param name="password">The string to be hashed.</param>
|
||||
/// <returns>The hashed string.</returns>
|
||||
string HashString(string password);
|
||||
|
||||
/// <summary>
|
||||
/// Verifies a password against a hash.
|
||||
/// </summary>
|
||||
/// <param name="password">The string to be checked.</param>
|
||||
/// <param name="hashedPassword">The hashed representation of the string to be checked.</param>
|
||||
/// <returns><see langword="true"/> if <paramref name="password"/> and the de-hashed versions of <paramref name="hashedPassword"/> are equal, <see langword="false"/> otherwise.</returns>
|
||||
bool CheckStringAgainstHash(string password, string hashedPassword);
|
||||
}
|
||||
Reference in new issue
Block a user