This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * This file is used to encrypt and decrypt the text using the password. | |
| * The password is used to derive the key using PBKDF2. | |
| * The key is used to encrypt and decrypt the text using AES-GCM. | |
| * The salt is used to derive the key using PBKDF2. | |
| * The nonce is used to encrypt and decrypt the text using AES-GCM. | |
| * The ciphertext is the encrypted text. | |
| * The salt, nonce, and ciphertext are concatenated and converted to Base64. | |
| * inspire by https://github.com/MetaMask/metamask-extension/blob/develop/app/scripts/controllers/user-storage/encryption.ts | |
| */ |