/*********************************************************************
*	Encryption
*	HEADER FILE
*	Autor:	Michal Jirouš
*	Datum: 29.9.2008
*	Soubor: encryption.h
*	Popis: Modul umoznuje ukladani / nacitani zakodovanych zprav podle
* 			jednoduche transpozicni sifry
**********************************************************************/

#include <string>

namespace encryption
{
	typedef long long int int64_t;
	const int	ENCRYPTION_MAP_MULTIPLICATOR	=	17;
	const unsigned int MAP_SIZE = 64;
	const unsigned int iShMax = (sizeof(char)*8) - 1;
	
	void createMap( unsigned short int ifMap[], int64_t key );
	std::string decryptFile( const char *filename );
	bool encrypt( const char *filename, std::string data );

	unsigned char llsh(unsigned char byte, int shift);	//logical left shift
	unsigned char lrsh(unsigned char byte, int shift);	//logical right shift
	unsigned char swap(unsigned char byte);
};

