/******************************************************************************
/* @(#) PUBLIC FUNCTION
/* @(#)
/* @(#) Description:
/* @(#) Get the hash value
/* @(#) Return value:
/* @(#) Valhash:the hash value of the char array;
/* @(#) 0:get the hash value failed
/* @(#) Calling parameters:
/* @(#) I: lpchar:the pointer point to the character array
/* @(#) Warning:
/* @(#) None
/*****************************************************************************/
DWORD WINAPI CHash(CONST TCHAR *lpchar)
{
/*initial values*/
DWORD Valhash = 0;
DWORD len = 0;
DWORD valop = 0;
unsigned int i = 0;
for(len = 0;lpchar[len] != NULL;len++);
if (0 >= len || len > 32)
{
/*failed*/
return Valhash;
}
/*start calc*/
本内容试读结束,登录后可阅读更多
下载后可阅读完整内容,剩余4页未读,立即下载