When I tested the crypt function, it returned different hashes than the ones listed in CS50's pset2, given the same salt and key:
{
char* testhash = crypt("rob", "50");
printf("hash for rob: %s\n", testhash);
testhash = crypt("brian", "50");
printf("hash for brian: %s\n", testhash);
return 0;
}
I got "50upJLRWneuTY" while CS50's hash for "rob" is "50JGnXUgaafgc", and "5044HIvTVFToI" while the hash for "brian" is "50mjprEcqC/ts". Why is this happening? Any inputs would be greatly appreciated :)