Re: crypt() woes - error in man page?
Peter Jay Salzman <p@belial.ucdavis.edu> writes:
> #include<stdio.h>
> #include<crypt.h>
> int main(int argc, char *argv[])
> {
> char salt1[] = "ab";
> char salt2[] = "$1$12345678";
> char key[] = "password"; /* :-) */
> char *pass1 = crypt(salt1, key);
> char *pass2 = crypt(salt2, key);
^^^^^^^^^^
shouldn't that be ...(key, salt1) and ...(key,salt2) instead?
This gives the output:
# ./a.out
DES: abJnggxhB/yWI
MD5: $1$12345678$o2n/JiO/h5VviOInWJ4OQ/
Hubert
Reply to: