kvs

Last updated:

0 purchases

kvs Image
kvs Images
Add to Cart

Description:

kvs

High performance persistant memory key-value storage with AES256 encryption.
Features #

Persistant storage in document directory or directory provided.
Supports encryption on rest.
Can be used as Map alternative.

Planned Features #

Use IndexedDB instead of localStorage

Usage #
void main() async {
var localStorage = KVS<String, int>(
name: 'storeName',
cipher: AESGCM256(key: 'mySecretKey'),
);

await localStorage.init();

localStorage['year'] = 2023;
localStorage['year']; // 2023
localStorage.length; // 1
localStorage.addAll({
'month': 1,
'date': 1,
});
localStorage.length; // 3
}

copied to clipboard
Add encryption to existing storage #
var localStorage = KVS<String, int>(
name: 'storeName'
);

await localStorage.init();

localStorage.cipher = AESGCM256(key: 'mySecretKey');
localStorage.flush();
copied to clipboard
Remove encryption from existing storage #
var localStorage = KVS<String, int>(
name: 'storeName',
cipher: AESGCM256(key: 'mySecretKey'),
);

await localStorage.init();

localStorage.cipher = null;
localStorage.flush();
copied to clipboard
Change encryption key of existing storage #
var localStorage = KVS<String, int>(
name: 'storeName',
cipher: AESGCM256(key: 'oldSecretKey'),
);

await localStorage.init();

localStorage.cipher = AESGCM256(key: 'newSecretKey');
localStorage.flush();
copied to clipboard

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.