You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
939 B
30 lines
939 B
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Model
|
|
{
|
|
/// <summary>
|
|
/// Define how to manage passwords.
|
|
/// </summary>
|
|
public interface IPasswordManager
|
|
{
|
|
/// <summary>
|
|
/// Hash a plain text password.
|
|
/// </summary>
|
|
/// <param name="password">The plain password to hash.</param>
|
|
/// <returns>The hashed password.</returns>
|
|
public string HashPassword(string password);
|
|
|
|
/// <summary>
|
|
/// Verify a plain text password with a hashed one.
|
|
/// </summary>
|
|
/// <param name="hashedPassword">The hashed password.</param>
|
|
/// <param name="password">The plain text password.</param>
|
|
/// <returns>True is the password is correct, false otherwise.</returns>
|
|
public bool VerifyPassword(string hashedPassword,string password);
|
|
}
|
|
}
|