关于unsigned char转化为CString的问题!
//Store final state in 'lpszMD5'
const int nMD5Size = 16;
unsigned char lpszMD5[ nMD5Size ];
DWordToByte( lpszMD5, m_lMD5, nMD5Size );
//Convert the hexadecimal checksum to a CString
CString strMD5;
for ( int i=0; i < nMD5Size; i++)
{
CString Str;
if (lpszMD5[i] == 0) {
Str = CString("00");
}
else if (lpszMD5[i] <= 15) {
Str.Format("0%x",lpszMD5[i]);←在VC2005下编译不过去
}
else {
Str.Format("%x",lpszMD5[i]);←这个也是
}
ASSERT( Str.GetLength() == 2 );
strMD5 += Str;
}
这是网上下载的MD5加密算法源码 VC2005下编译不过 请问怎么改啊?