I am developing logon function for my iPhone Application, so I want to hash the password using the SHA512 hashing algorithm then get the result as NSString (the result should be the same with SHA512 in C#). After spending a lot of time in the internet, I still not find out the solution yet! 🙁
Is there anyone has the solution and sample code, please help me!
Thanks a lot!
[Update]
In my C# code, the password is stored using SecureString, so maybe it’s cause make different byte array between objective-c and C#
This function will hash a string using SHA512. The resulting string is a hex representation of the hash:
Don’t forget to include the correct header: