Select from following answers:- byte[] hashedPasswordToMatch = BitConverter.GetBytes(SHhash.GetHashCode()); return hashedPasswordToMatch.Length == hashedPassword.Length;
- byte[] hashedPasswordToMatch = SHhash.ComputeHash(bytes); return hashedPasswordToMatch.Length == hashedPassword.Length
- byte[] hashedPasswordToMatch = SHhash.ComputeHash(bytes);for (int i = 0; i < hashedPasswordToMatch.Length; i++) { if hashedPasswordToMatch[x] != hashedPasswordToMatch[x]) { return false; } return true;
- All Above
To compare the passwords, you must call the ComputeHash method of the SHA1Managed instance. To determine if the password hashes match, you must then compare the value of each returned byte with the corresponding byte in the given hash.
The GetHashCode method of the SHA1Managed instance returns the hash code of the instance itself. This hash code is a numeric value that is used to identify an object during equality testing. It can also serve as an index for an object in a collection. It is unrelated to the byte data.
Show Correct Answer
Source: Measureup.com | |
Alert Moderator