[Release] wrt-commons_0.2.139
[framework/web/wrt-commons.git] / modules / encryption / include / dpl / encryption / resource_encryption.h
index 6f57a93..f2e4988 100644 (file)
 
 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