Methods
decrypt(password, text) → {Promise.<Object>}
- Source:
Decrypts an arbitrary JavaScript object from cypher text
Parameters:
Name | Type | Description |
---|---|---|
password |
string | Password used to unlock a cryptographic key |
text |
string | Cypher text of an encrypted JavaScript object |
Returns:
Promise resolving to copy of decrypted JavaScript object
- Type
- Promise.<Object>
encrypt(password, dataObject) → {Object}
- Source:
Encrypts an arbitrary JavaScript object to cypher text
Parameters:
Name | Type | Description |
---|---|---|
password |
string | Password used to unlock a cryptographic key |
dataObject |
Object | Data to encrypt |
Returns:
Object containing cypher text, generation vectors, and salt
- Type
- Object