extern char** calculate(char*pappId, int idLen, int keyLen);
-namespace WRTEncryptor{
+namespace WRTEncryptor {
class ResourceEncryptor
{
public:
- class Exception
- {
- public:
- DECLARE_EXCEPTION_TYPE(DPL::Exception, Base)
- DECLARE_EXCEPTION_TYPE(DPL::Exception, CreateEncKeyFailed)
- DECLARE_EXCEPTION_TYPE(DPL::Exception, CreateDecKeyFailed)
- DECLARE_EXCEPTION_TYPE(DPL::Exception, CreateEncKeyFileFailed)
- DECLARE_EXCEPTION_TYPE(DPL::Exception, CreateDecKeyFileFailed)
- DECLARE_EXCEPTION_TYPE(DPL::Exception, EncryptionFailed)
- };
+ class Exception
+ {
+ public:
+ DECLARE_EXCEPTION_TYPE(DPL::Exception, Base)
+ DECLARE_EXCEPTION_TYPE(DPL::Exception, CreateEncKeyFailed)
+ DECLARE_EXCEPTION_TYPE(DPL::Exception, CreateDecKeyFailed)
+ DECLARE_EXCEPTION_TYPE(DPL::Exception, CreateEncKeyFileFailed)
+ DECLARE_EXCEPTION_TYPE(DPL::Exception, CreateDecKeyFileFailed)
+ DECLARE_EXCEPTION_TYPE(DPL::Exception, EncryptionFailed)
+ };
- ResourceEncryptor();
- virtual ~ResourceEncryptor();
+ ResourceEncryptor();
+ virtual ~ResourceEncryptor();
- int GetBlockSize(int inSize);
- void CreateEncryptionKey(std::string userKey);
- void EncryptChunk(unsigned char* inputBuf, unsigned char* encBuf, size_t
- chunkSize);
+ int GetBlockSize(int inSize);
+ void CreateEncryptionKey(std::string userKey);
+ void EncryptChunk(unsigned char* inputBuf, unsigned char* encBuf, size_t
+ chunkSize);
private:
- AES_KEY GetEncryptionkey();
- AES_KEY m_encKey;
+ AES_KEY GetEncryptionkey();
+ AES_KEY m_encKey;
};
} //namespace WRTEncryptor