class JniOcSecurity
{
private:
+ static size_t getDBSize(const char *filepath);
+ static OCStackResult ResetDBFile(const char *cred_file);
+ static size_t client_read(void *buffer, size_t size, size_t nmemb, FILE *fp);
+
+ static size_t client_write(const void *buffer, size_t size,
+ size_t nmemb, FILE *fp);
static FILE* client_open(const char*, const char*);
+ static FILE* client_open_enc(const char*, const char*);
+ static FILE* client_open_rescue(const char*, const char*);
+ static int client_unlink(const char *path);
+ static int client_encrypt(const unsigned char *pt, size_t pt_len,
+ unsigned char **ct, size_t *ct_len);
+ static int client_decrypt(const unsigned char *ct, size_t ct_len,
+ unsigned char **pt, size_t *pt_len);
public:
static std::string& store_path(void);
+ static std::string& getEncDbPath(void);
+ static std::string& getRescueDbPath(void);
static void StoreDbPath(const std::string&);
+ static void StoreDefault_DbPath(const std::string&, const std::string&, int);
static OCPersistentStorage* getOCPersistentStorage(void);
+ static OCPersistentStorage* getOCPersistentStorageEnc(void);
+ static OCPersistentStorage* getOCPersistentStorageRescue(void);
+
};
}
#endif //__JNIOCSECURITY_H