using IOL.Fagprove.Data.Models; using Microsoft.AspNetCore.Identity; namespace IOL.Fagprove.Utilities { public static class PasswordHasher { public static string HashPassword(string password) { var hasher = new PasswordHasher(); return hasher.HashPassword(null, password); } public static bool PasswordMatches(string hash, string password) { var hasher = new PasswordHasher(); return hasher.VerifyHashedPassword(null, hash, password) == PasswordVerificationResult.Success; } } }