// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. namespace Microsoft.AspNet.Identity { /// /// Implements password hashing methods /// public class PasswordHasher : IPasswordHasher { /// /// Hash a password /// /// /// public virtual string HashPassword(string password) { return Crypto.HashPassword(password); } /// /// Verify that a password matches the hashedPassword /// /// /// /// public virtual PasswordVerificationResult VerifyHashedPassword(string hashedPassword, string providedPassword) { return Crypto.VerifyHashedPassword(hashedPassword, providedPassword) ? PasswordVerificationResult.Success : PasswordVerificationResult.Failed; } } }