#ifndef SC_H_INCLUDED
#define SC_H_INCLUDED

#include <crypto/crypto.h>
#include <crypto/kdf.h>
#include <crypto/bc.h>

class SC
{
 public:
	int keylen;
	virtual ostring encrypt(const ostring& key, const ostring& mssg) = 0;
	virtual ostring decrypt(const ostring& key, const ostring& cipher) = 0;

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

	SC(int len) : keylen(len) { };
};


class SC1 : public SC
{
	BC& b;
 public:
	ostring encrypt(const ostring& key, const ostring& mssg);
        ostring decrypt(const ostring& key, const ostring& cipher);

	void PrettyPrint(std::ostream&);

	SC1(BC& B) : b(B), SC(B.keysize) { };
};

class SC2 : public SC
{
	KDF& k;
 public:
	ostring encrypt(const ostring& key, const ostring& mssg);
        ostring decrypt(const ostring& key, const ostring& cipher);

	void PrettyPrint(std::ostream&);

	SC2(KDF& K, int len) : k(K), SC(len) { };
};

#endif /* SC_H_INCLUDED */

