#ifndef BC_H_INCLUDED
#define BC_H_INCLUDED

#include <crypto/crypto.h>


class BC
{
 public:
	const int blocklen;
	const int keysize;
	virtual ostring encrypt(const ostring& key, const ostring& mssg) = 0;
	virtual ostring decrypt(const ostring& key, const ostring& mssg) = 0;

	virtual void PrettyPrint(std::ostream&) = 0;

	BC(int block, int key) : blocklen(block), keysize(key) { };
};


class AES : public BC
{
 public:
	ostring encrypt(const ostring& key, const ostring& mssg);
        ostring decrypt(const ostring& key, const ostring& mssg);

	void PrettyPrint(std::ostream&);

	AES(int len) : BC(AES_BLOCK_SIZE, len)
	{
		if(keysize != 16 && keysize != 24 && keysize != 32)
			throw Key_error();
	};
};

#endif /* BC_H_INCLUDED */

