/*
 *  ceasar.c
 *  
 *
 *  Created by Dimitris Geneiatakis on 5/24/09.
 *  Copyright 2009 __MyCompanyName__. All rights reserved.
 *
 */

#include "ceasar.h"

#include <stdio.h>

int   
main()
{
	FILE *fp_clear_text;
	FILE * fp_crypto_text;
	unsigned char crypto [1000];
	int i;
	char c;
	int k=0;
	i=0;

	
	
	fp_clear_text = fopen( "clear_text.txt", "r");
	memset(crypto,0,sizeof(char)*1000);
	if (fp_clear_text == NULL)
	{
		// Error, file not found
		printf("the file could not be opened\n");
		
	}
	
	else
	{
		while((c=fgetc(fp_clear_text))!=EOF){
			printf("%c\n",c);
			//put here the crypto code
				
		}
		//  close file
		fclose(fp_clear_text);
	}
	
	fp_crypto_text=fopen("crypto_text.txt", "w");
	fwrite(crypto, sizeof(char), sizeof(crypto)/sizeof(char), fp_crypto_text);
	fclose(fp_crypto_text);
	
	return 0;

}

