Methods
decrypt(password, text) → {Promise.<Object>}
- Source:
Decrypts an arbitrary object from ciphertext
Parameters:
Name | Type | Description |
---|---|---|
password |
string | Used to generate a key to decrypt the data |
text |
string | Ciphertext of an encrypted object |
Returns:
Promise resolving to copy of decrypted object
- Type
- Promise.<Object>
encrypt(password, dataObject) → {Promise.<string>}
- Source:
Encrypts an arbitrary object to ciphertext
Parameters:
Name | Type | Description |
---|---|---|
password |
string | Used to generate a key to encrypt the data |
dataObject |
Object | Data to encrypt |
Returns:
Promise resolving to an object with ciphertext
- Type
- Promise.<string>