I have used the crypt function in c to encrypt the given string.
I have written the following code,
#include<stdio.h>
#include<unistd.h>
int main()
{
printf("%s\n",crypt("passwd",1000));
}
If you want to use the crypt()
function, you need to link to the crypt library. Add -lcrypt
to your compile command (as the man page tells you to!).