1. --------------------------------------------------------------------------- ( THE HASHING METHOD THEY USED ) -> PASSWORD HASHER.DLL Please check down
  2. namespace Microsoft.AspNet.Identity
  3. {
  4. internal static class Crypto
  5. {
  6. private const int PBKDF2IterCount = 1000;
  7. private const int PBKDF2SubkeyLength = 32;
  8. private const int SaltSize = 16;
  9. public static string HashPassword(string password)
  10. {
  11. if (password == null)
  12. throw new ArgumentNullException(nameof (password));
  13. byte[] salt;
  14. byte[] bytes;
  15. using (Rfc2898DeriveBytes rfc2898DeriveBytes = new Rfc2898DeriveBytes(password, 16, 1000))
  16. {
  17. salt = rfc2898DeriveBytes.Salt;
  18. bytes = rfc2898DeriveBytes.GetBytes(32);
  19. }
  20. byte[] inArray = new byte[49];
  21. Buffer.BlockCopy((Array) salt, 0, (Array) inArray, 1, 16);
  22. Buffer.BlockCopy((Array) bytes, 0, (Array) inArray, 17, 32);
  23. return Convert.ToBase64String(inArray);
  24. }
  25. public static bool VerifyHashedPassword(string hashedPassword, string password)
  26. {
  27. if (hashedPassword == null)
  28. return false;
  29. if (password == null)
  30. throw new ArgumentNullException(nameof (password));
  31. byte[] numArray = Convert.FromBase64String(hashedPassword);
  32. if (numArray.Length != 49 || numArray[0] != (byte) 0)
  33. return false;
  34. byte[] salt = new byte[16];
  35. Buffer.BlockCopy((Array) numArray, 1, (Array) salt, 0, 16);
  36. byte[] a = new byte[32];
  37. Buffer.BlockCopy((Array) numArray, 17, (Array) a, 0, 32);
  38. byte[] bytes;
  39. using (Rfc2898DeriveBytes rfc2898DeriveBytes = new Rfc2898DeriveBytes(password, salt, 1000))
  40. bytes = rfc2898DeriveBytes.GetBytes(32);
  41. return Crypto.ByteArraysEqual(a, bytes);
  42. }
  43. [MethodImpl(MethodImplOptions.NoOptimization)]
  44. private static bool ByteArraysEqual(byte[] a, byte[] b)
  45. {
  46. if (object.ReferenceEquals((object) a, (object) b))
  47. return true;
  48. if (a == null || b == null || a.Length != b.Length)
  49. return false;
  50. bool flag = true;
  51. for (int index = 0; index < a.Length; ++index)
  52. flag &= (int) a[index] == (int) b[index];
  53. return flag;
  54. }
  55. }
  56. }

Encryption Mode