lowdb-crypto-adapter
A lowdb adapter for encrypting data to be stored
Installation
npm install lowdb-crypto-adapter --save
Usage
const low = ;const CryptoAdapter = ; let adapter;try adapter = 'my.db' 'PASSWORD'; catcherror console; // and then you can use lowdb as usual, but now your data is secured const db = ; // Set some defaults (required if your JSON file is empty)db // Add a postdb
API
new CryptoAdapter(file, password, [test])
Creates a new adapter for lowdb
Arguments
file
- (string) Path to the database filepassword
- (string) Sekret key, that will be used to encrypt/decrypt data[test]
- (boolen) If true, a connection to the database will be performed, and, if it will faled, an Error will be thrown. By default it is true