40 references to KeyDerivationPrf
Microsoft.AspNetCore.Cryptography.KeyDerivation (28)
KeyDerivation.cs (3)
28public static byte[] Pbkdf2(string password, byte[] salt, KeyDerivationPrf prf, int iterationCount, int numBytesRequested) 34if (prf < KeyDerivationPrf.HMACSHA1 || prf > KeyDerivationPrf.HMACSHA512)
PBKDF2\IPbkdf2Provider.cs (1)
11byte[] DeriveKey(string password, byte[] salt, KeyDerivationPrf prf, int iterationCount, int numBytesRequested);
PBKDF2\ManagedPbkdf2Provider.cs (5)
17public byte[] DeriveKey(string password, byte[] salt, KeyDerivationPrf prf, int iterationCount, int numBytesRequested) 69private static KeyedHashAlgorithm PrfToManagedHmacAlgorithm(KeyDerivationPrf prf, string password) 76case KeyDerivationPrf.HMACSHA1: 78case KeyDerivationPrf.HMACSHA256: 80case KeyDerivationPrf.HMACSHA512:
PBKDF2\NetCorePbkdf2Provider.cs (4)
17public byte[] DeriveKey(string password, byte[] salt, KeyDerivationPrf prf, int iterationCount, int numBytesRequested) 27case KeyDerivationPrf.HMACSHA1: 30case KeyDerivationPrf.HMACSHA256: 33case KeyDerivationPrf.HMACSHA512:
PBKDF2\Win7Pbkdf2Provider.cs (5)
16public byte[] DeriveKey(string password, byte[] salt, KeyDerivationPrf prf, int iterationCount, int numBytesRequested) 84private static BCryptAlgorithmHandle PrfToCachedCngAlgorithmInstance(KeyDerivationPrf prf) 88case KeyDerivationPrf.HMACSHA1: 90case KeyDerivationPrf.HMACSHA256: 92case KeyDerivationPrf.HMACSHA512:
PBKDF2\Win8Pbkdf2Provider.cs (10)
18public byte[] DeriveKey(string password, byte[] salt, KeyDerivationPrf prf, int iterationCount, int numBytesRequested) 58private static BCryptKeyHandle PasswordToPbkdfKeyHandle(string password, BCryptAlgorithmHandle pbkdf2AlgHandle, KeyDerivationPrf prf) 98private static BCryptKeyHandle PasswordToPbkdfKeyHandleStep2(BCryptAlgorithmHandle pbkdf2AlgHandle, byte* pbPassword, uint cbPassword, KeyDerivationPrf prf) 115case KeyDerivationPrf.HMACSHA1: 118case KeyDerivationPrf.HMACSHA256: 121case KeyDerivationPrf.HMACSHA512: 196private static string PrfToCngAlgorithmId(KeyDerivationPrf prf) 200case KeyDerivationPrf.HMACSHA1: 202case KeyDerivationPrf.HMACSHA256: 204case KeyDerivationPrf.HMACSHA512:
Microsoft.Extensions.Identity.Core (12)
PasswordHasher.cs (12)
115const KeyDerivationPrf Pbkdf2Prf = KeyDerivationPrf.HMACSHA1; // default for Rfc2898DeriveBytes 135prf: KeyDerivationPrf.HMACSHA512, 141private static byte[] HashPasswordV3(string password, RandomNumberGenerator rng, KeyDerivationPrf prf, int iterCount, int saltSize, int numBytesRequested) 194if (VerifyHashedPasswordV3(decodedHashedPassword, providedPassword, out int embeddedIterCount, out KeyDerivationPrf prf)) 203if (prf == KeyDerivationPrf.HMACSHA1 || prf == KeyDerivationPrf.HMACSHA256) 222const KeyDerivationPrf Pbkdf2Prf = KeyDerivationPrf.HMACSHA1; // default for Rfc2898DeriveBytes 250private static bool VerifyHashedPasswordV3(byte[] hashedPassword, string password, out int iterCount, out KeyDerivationPrf prf) 253prf = default(KeyDerivationPrf); 258prf = (KeyDerivationPrf)ReadNetworkByteOrder(hashedPassword, 1);