From ebb50ae344f96c589b3a6dffb664ba6a82b2d42f Mon Sep 17 00:00:00 2001 From: Keerthi Niranjan Date: Thu, 10 Aug 2017 14:30:04 +0530 Subject: [PATCH] Working on SEARCH-116 Implement Encryption and Decryption of Index --- js/cryptoLib/index.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 js/cryptoLib/index.js diff --git a/js/cryptoLib/index.js b/js/cryptoLib/index.js new file mode 100644 index 00000000..e25ca53c --- /dev/null +++ b/js/cryptoLib/index.js @@ -0,0 +1,25 @@ +'use strict'; +const electron = require('electron'); +const app = electron.app; +const path = require('path'); +const isDevEnv = require('../utils/misc.js').isDevEnv; + +const userData = path.join(app.getPath('userData')); +const INDEX_DATA_FOLDER = isDevEnv ? './data' : path.join(userData, 'data'); + +class Crypto { + + constructor() { + this.indexDataFolder = INDEX_DATA_FOLDER; + } + + encryption() { + console.log(this.indexDataFolder) + } + + decryption() { + console.log(this.indexDataFolder) + } +} + +module.exports = Crypto; \ No newline at end of file