MD5 in Object-C and C#
Posted
by user360161
on Stack Overflow
See other posts from Stack Overflow
or by user360161
Published on 2010-06-07T07:48:57Z
Indexed on
2010/06/07
7:52 UTC
Read the original article
Hit count: 553
Hi, I have a method written in c# to get md5:
public static string encryptPasswordWithMd5(string password)
{
MD5 md5Hasher = MD5.Create();
byte[] data = md5Hasher.ComputeHash(Encoding.Unicode.GetBytes(password));
StringBuilder sb = new StringBuilder();
for (int i = 0; i < data.Length; i++)
sb.Append(data[i].ToString("x2"));
return sb.ToString();
}
now I need to implement the same function using objective-c, how to do it...
© Stack Overflow or respective owner