C
Carsten Maul
Hi,
I want to generate an MD5 checksum with crypt.h, installed OS Debian Woody.
Unfortunately I only get DES hashes with
strncpy(salt, row[0], 12);
salt[12] = '\0';
encryptedPass = crypt(passwd, salt);
free(salt);
Later I compare the two:
if (!strcmp(row[0], encryptedPass))
row[0] looks like that: $1$mYV0L3j8$nUUWy09JYrzdXurr92ywv1
salt starts with $1$ to indicate that I want an MD5 hash.
Unfortunately the encryptedPass looks like that:
1ba49f4d1ff0f49c
What am I doing wrong ? Did I forget anything ?
Thanks
I want to generate an MD5 checksum with crypt.h, installed OS Debian Woody.
Unfortunately I only get DES hashes with
strncpy(salt, row[0], 12);
salt[12] = '\0';
encryptedPass = crypt(passwd, salt);
free(salt);
Later I compare the two:
if (!strcmp(row[0], encryptedPass))
row[0] looks like that: $1$mYV0L3j8$nUUWy09JYrzdXurr92ywv1
salt starts with $1$ to indicate that I want an MD5 hash.
Unfortunately the encryptedPass looks like that:
1ba49f4d1ff0f49c
What am I doing wrong ? Did I forget anything ?
Thanks