ujjwalguptaofficial / JsStore

Simplifying IndexedDB with SQL like syntax and promises
http://jsstore.net/
MIT License
858 stars 110 forks source link

Is there some way to encrypt data #183

Closed xland closed 3 years ago

xland commented 4 years ago

Title

Is there some way to encrypt the data

Description

Is there some way to encrypt the data

const dataBase: IDataBase = {
        name: dbname,
        tables: [tblStudent],
        encrypt: true    //like this,   "dex" or "rsa"
};
ujjwalguptaofficial commented 4 years ago

no JsStore does not provide anything to do data processing but i have plan to solve this issue by creating plugins support in jsstore.

I am thinking about adding middleware. So every api call be passed to series of middleware which can modify the inputs and finally will be passed to api. This way user can add common code & convert code into plugins.

Let me know if you have any suggestion. I will create it by end of week.

ujjwalguptaofficial commented 4 years ago

@xland i have added support for middleware & plugin in version - 3.11.1.

Here are doc link -

Using middleware you can encrypt data or decrypt data. So encrypting while inserting and decrypting while selecting.

If you have some time, i will request you to create a plugin and npm it so that other users also can take advantage of yours work :).

Let me know if need my help.

xland commented 4 years ago

Sorry, I can not contribute for that plugin now, Maybe some days later. Thanks very much.

ujjwalguptaofficial commented 3 years ago

I have created a plugin jsstore-encrypt. It lets you store data in encrypted form with your own encryption method. Check the repo here - https://github.com/ujjwalguptaofficial/jsstore-encrypt

If you want any improvement or have any suggestion, feel free to raise issue on the jsstore-encrypt repo.