From 8592b2e7b1c3fbbbbab711446cd17de9d60b8cc1 Mon Sep 17 00:00:00 2001 From: Levi B Date: Tue, 17 Mar 2015 22:09:53 -0700 Subject: [PATCH] React to DataProtection changes. --- src/Microsoft.AspNet.Identity/PasswordHasher.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Microsoft.AspNet.Identity/PasswordHasher.cs b/src/Microsoft.AspNet.Identity/PasswordHasher.cs index 6cc8df07b9..44a658e8fd 100644 --- a/src/Microsoft.AspNet.Identity/PasswordHasher.cs +++ b/src/Microsoft.AspNet.Identity/PasswordHasher.cs @@ -108,7 +108,7 @@ namespace Microsoft.AspNet.Identity private static byte[] HashPasswordV2(string password, RandomNumberGenerator rng) { - const KeyDerivationPrf Pbkdf2Prf = KeyDerivationPrf.Sha1; // default for Rfc2898DeriveBytes + const KeyDerivationPrf Pbkdf2Prf = KeyDerivationPrf.HMACSHA1; // default for Rfc2898DeriveBytes const int Pbkdf2IterCount = 1000; // default for Rfc2898DeriveBytes const int Pbkdf2SubkeyLength = 256 / 8; // 256 bits const int SaltSize = 128 / 8; // 128 bits @@ -128,7 +128,7 @@ namespace Microsoft.AspNet.Identity private byte[] HashPasswordV3(string password, RandomNumberGenerator rng) { return HashPasswordV3(password, rng, - prf: KeyDerivationPrf.Sha256, + prf: KeyDerivationPrf.HMACSHA256, iterCount: _iterCount, saltSize: 128 / 8, numBytesRequested: 256 / 8); @@ -220,7 +220,7 @@ namespace Microsoft.AspNet.Identity private static bool VerifyHashedPasswordV2(byte[] hashedPassword, string password) { - const KeyDerivationPrf Pbkdf2Prf = KeyDerivationPrf.Sha1; // default for Rfc2898DeriveBytes + const KeyDerivationPrf Pbkdf2Prf = KeyDerivationPrf.HMACSHA1; // default for Rfc2898DeriveBytes const int Pbkdf2IterCount = 1000; // default for Rfc2898DeriveBytes const int Pbkdf2SubkeyLength = 256 / 8; // 256 bits const int SaltSize = 128 / 8; // 128 bits