1 #if defined(HAVE_UNISTD_H)
22 char expected_out
[14];
24 strcpy(expected_out
, "12yJ.Of/NQ.Pk");
25 strcpy(passwd
, "12345678");
26 strcpy(salt
, "12345678");
28 strcpy(c_out1
, crypt(passwd
, salt
));
30 strcpy(c_out2
, crypt(passwd
, salt
));
33 * If the non-trucated salt fails but the
34 * truncated salt succeeds then exit 1.
37 if((strcmp(c_out1
, expected_out
) != 0) &&
38 (strcmp(c_out2
, expected_out
) == 0))
43 * Try the same with bigcrypt...
51 char big_expected_out
[27];
53 strcpy(big_passwd
, "1234567812345678");
54 strcpy(big_salt
, "1234567812345678");
55 strcpy(big_expected_out
, "12yJ.Of/NQ.PklfyCuHi/rwM");
57 strcpy(big_c_out1
, bigcrypt(big_passwd
, big_salt
));
59 strcpy(big_c_out2
, bigcrypt(big_passwd
, big_salt
));
62 * If the non-trucated salt fails but the
63 * truncated salt succeeds then exit 1.
66 if((strcmp(big_c_out1
, big_expected_out
) != 0) &&
67 (strcmp(big_c_out2
, big_expected_out
) == 0))