Skip to content

Latest commit

 

History

History
61 lines (41 loc) · 924 Bytes

README.md

File metadata and controls

61 lines (41 loc) · 924 Bytes

Field Level Encryption

Running the project

  1. Export env file
  2. Install MongoDB
  3. Install Node Js
  4. Run following commands
npm install
node index

API

1. Get Data

curl -XGET 'localhost:8900/[email protected]'

2. Add Data

curl -XPOST -H "Content-type: application/json" -d '{
    "name": "Test User",
     "email": "[email protected]",
     "phone": "9999999999"
}' 'localhost:8900/'

3. Agreegation

curl -XGET 'localhost:8900/[email protected]'

Benchmarking

1. Install autocannon

npm i auto autocannon

2. Command

autocannon -c 100 -d 5 http://localhost:8900/[email protected]

3. Benchmarking the Get API

a. Disabling Encryption

  • Remove getters and setters from users model to disable encryption

b. Enabling Encryption

  • Add the getters and setters back to enable encryption