#include "Cryptopp/rsa.h"
#include "Cryptopp/osrng.h"
#include "RSAKey.h"
using namespace CryptoPP;
class CRSAEnc
{
public:
Integer Modulus, Exponent, IntegerD, IntegerP, IntegerQ, IntegerDP, IntegerDQ, IntegerInverseQ;
RSAES_PKCS1v15_Encryptor* pEncryptor;
RSAES_PKCS1v15_Decryptor* pDecryptor;
int nLengthOutBytes;
AutoSeededRandomPool rng;
void Init(CRSAKey& rsakey);
void Encrypt(const BYTE* input, int inputlen,BYTE** output, int* outputlen);
void Decrypt(const BYTE* input, int inputlen,BYTE** output, int* outputlen);
void InternalEncrypt(const unsigned char * pbIn, int nLengthInBytes, unsigned char ** ppbOut);
void InternalDecrypt(const unsigned char * pbIn, int nLengthInBytes, unsigned char ** ppbOut);
};