日期:2014-05-16 浏览次数:20703 次
void unIntArraryTochar(unsigned *sha1,char *md, int size)
{
md = (char*)malloc(20*sizeof(char));
int j = 0;
for(int i=0; i<size; i++ ){
unsigned int value = sha1[i];
md[j] = (char)(value>>24);
md[++j] = (char)(value>>16);
md[++j] = (char)(value>>8);
md[++j] = (char)(value);
++j;
}
char *md = NULL;
unIntArraryTochar(sha1,md,size);
char *md = (char *)malloc(sizeof(char)*20);
unIntArraryTochar(sha1,md,size);