encrypt-webstorage code example
Example 1: encrypt-webstorage
npm install encrypt-webstorage@latest
Example 2: encrypt-webstorage
import {EncryptionService} from "encrypt-webstorage";
constructor(private encryptor : EncryptionService){}
const secret_key = "!!34fffd99kdsdnn@as"
let encryptedString = this.encryptor.encryptionAES({"test" : "test"});
console.log('encrypted',encryptedString);
let decryptedValue = this.encryptor.decryptionAES(encryptedString);
console.log('decrypted',decryptedValue);
this.encryptor.encryptionAES({"test" : "test"}, secret_key);
this.encryptor.decryptionAES(encryptedString, secret_key);
Example 3: encrypt-webstorage
import {WebStorageService} from "encrypt-webstorage";
constructor(private webStorage : WebStorageService){}
this.webStorage.setItem('test','test');
this.webStorage.setItem('test',10);
this.webStorage.setItem('test',{"test" : "test"});
this.webStorage.setItem('test');
Example 4: encrypt-webstorage
npm install --legacy-peer-deps --save encrypt-webstorage@latest