Skip to main content
edited tags
Link
Markus Jarderot
  • 89.7k
  • 23
  • 141
  • 142
Source Link

Is this the correct implementation of PBKDF2 in c#

 public static string GenerateHash(string password, string salt, int iterations) { var pbkdf2 = new Rfc2898DeriveBytes(password, Convert.FromBase64String(salt), iterations); var keyBytes = pbkdf2.GetBytes(32); return Convert.ToBase64String(keyBytes); } 

I am getting a hashed password that is to be used in a zip archive, but I don't know if I'm actually retrieving the hash correctly.