Key Strengthening. Am I Doing It Right?
问题 I am writing a class to hash passwords which implements Key Stretching by using the System.Security.Cryptography.Rfc2898DeriveBytes class to generate the keys used to compute the hash value. The code essentially does this: // Higher iterations value results in better key strength var db = new Rfc2898DeriveBytes(password + salt + secretKeyFromConfigFile, saltAsBytes, iterations); byte[] hashKey = db.GetBytes(64); // 64 bytes is the recommended size for the HMACSHA512 class var sha512 = new