i can get crypt to print the expected hash when i put the string directly into the function. however when passing a char array in i seem to be getting a different hash. Any suggestions?
char password3[3];
password3[0] = alphabet[i];
password3[1] = alphabet[j];
password3[2] = alphabet[k];
printf("%s\n", password3);
//Use crypt to hash new password using salt from user inputed hash
//Compare user hash with hashed guessed password
printf("%s\n", (crypt(password3, salt)));
printf("%s\n", userhash);
if (strcmp(userhash, crypt(password3, salt)) == 0)
Result LOL 50z.apvJv.NgQ
which is not correct.