#include <stdio.h>
#define __USE_XOPEN
#define _XOPEN_SOURCE
#include <unistd.h>
#include <string.h>

int main()
{
  char password[100];
  
  strncpy(password, crypt("topsecret","$1$kesi3kdk$"),100);
  password[99] = '\0';
  
  printf("\n\nA sample encrypted password: %s\n", password);
  if( (strlen(password) == 34) &&
       (strstr(password, "$1$") == password) &&
     (*(password + 11) == '$'))
          puts("Looks like MD5!\nYou should set USE_MD5_ENCRYPTION to '1' in global.h\n\n");
  else
          puts("This doesn't look like an MD5 encryption.\n You should probably set USE_MD5_ENCRYPTION to '0' in global.h\n\n");
  
  return 0;
}

                    
        
     
     
