2020-03-30 21:27:35 +02:00
|
|
|
using Microsoft.AspNetCore.Identity;
|
|
|
|
|
using IPasswordHasher = Umbraco.Core.Security.IPasswordHasher;
|
|
|
|
|
|
2020-03-31 15:36:25 +02:00
|
|
|
namespace Umbraco.Web.Common.AspNetCore
|
2020-03-30 21:27:35 +02:00
|
|
|
{
|
|
|
|
|
public class AspNetCorePasswordHasher : IPasswordHasher
|
|
|
|
|
{
|
|
|
|
|
private PasswordHasher<object> _underlyingHasher;
|
|
|
|
|
|
|
|
|
|
public AspNetCorePasswordHasher()
|
|
|
|
|
{
|
|
|
|
|
_underlyingHasher = new PasswordHasher<object>();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string HashPassword(string password)
|
|
|
|
|
{
|
|
|
|
|
return _underlyingHasher.HashPassword(null, password);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|