P
PawelR
Hello Group
I've problem with convert this function
private string getMD5(string s1)
{
string s1 = "UserName"
byte[] data1ToHash = (new UnicodeEncoding()).GetBytes(s1);
byte[] hashvalue1 = ((HashAlgorithm) CryptoConfig.CreateFromName
("MD5")).ComputeHash(data1ToHash);
string s2=BitConverter.ToString(hashvalue1);
for (int i=s2.Length;i>3;i-=3) s2=s2.Remove(i-3,1);
s2=s2.Replace("A","1");
s2=s2.Replace("0","A");
s2=s2.Replace("1","0");
return s2;
}
This generate hash string - code to application.
My question: How write this function in C++.Net (mfc)?
Thx
PawelR
I've problem with convert this function
private string getMD5(string s1)
{
string s1 = "UserName"
byte[] data1ToHash = (new UnicodeEncoding()).GetBytes(s1);
byte[] hashvalue1 = ((HashAlgorithm) CryptoConfig.CreateFromName
("MD5")).ComputeHash(data1ToHash);
string s2=BitConverter.ToString(hashvalue1);
for (int i=s2.Length;i>3;i-=3) s2=s2.Remove(i-3,1);
s2=s2.Replace("A","1");
s2=s2.Replace("0","A");
s2=s2.Replace("1","0");
return s2;
}
This generate hash string - code to application.
My question: How write this function in C++.Net (mfc)?
Thx
PawelR