#include <stdlib.h>
#include <stdio.h>
#include <string.h>

char outg[8192];		// result of encode (returned)

char *Encrypt(char *string, char *password)
{
char toenc[8192];	// String to encode
char pass[1024];	// Password to encode
int i=0;		// Current inbyte pos
int k=0;		// Current outbyte pos
int passlen=0;		// lenght of the password string
int stringlen=0;

strcpy(toenc,string);
strcpy(pass,password);

passlen = strlen(pass);
stringlen = strlen(toenc);

while ( i < stringlen )
   {
   outg[i] = toenc[i] + pass[k];
   k++;
   if ( k > passlen )
      k=0;
   i++;
   }
//printf("\n (-) Enc = [%s]\n",outg);
return outg;
}
