Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9e150eb

Browse files
authored
Use one shot pbkdf2 (#31200)
* Use one shot pbkdf2* Update NetCorePbkdf2Provider.cs* CR feedback* CR feedback* Fix* Just use GetBytes for now* Update NetCorePbkdf2Provider.cs
1 parent63553a5 commit9e150eb

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

‎src/DataProtection/Cryptography.KeyDerivation/src/PBKDF2/NetCorePbkdf2Provider.cs‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,7 @@ private static byte[] DeriveKeyImpl(string password, byte[] salt, KeyDerivationP
5454
thrownewArgumentOutOfRangeException();
5555
}
5656

57-
varpasswordBytes=Encoding.UTF8.GetBytes(password);
58-
using(varrfc=newRfc2898DeriveBytes(passwordBytes,salt,iterationCount,algorithmName))
59-
{
60-
returnrfc.GetBytes(numBytesRequested);
61-
}
57+
returnRfc2898DeriveBytes.Pbkdf2(Encoding.UTF8.GetBytes(password),salt,iterationCount,algorithmName,numBytesRequested);
6258
}
6359
}
6460
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp