Constructor
new SafeStorage(password)
- Description:
- Create a new
SafeStorage
with a password
- Create a new
- Source:
- Since:
- 0.1.0
- See:
Parameters:
Name | Type | Description |
---|---|---|
password |
string | Password to encrypt/decrypt |
Methods
(async) decryptString(encrypted) → {Promise.<string>}
- Description:
- Decrypt encrypted text with the password passed in the constructor
- Source:
- Since:
- 0.1.0
Parameters:
Name | Type | Description |
---|---|---|
encrypted |
string | Encrypted text to decrypt |
Returns:
Promise that resolves with the decrypted text
- Type
- Promise.<string>
(async) encryptString(plainText) → {Promise.<string>}
- Description:
- Encrypt plain text with the password passed in the constructor
- Source:
- Since:
- 0.1.0
Parameters:
Name | Type | Description |
---|---|---|
plainText |
string | Plain text to encrypt |
Returns:
Promise that resolves with the encrypted text
- Type
- Promise.<string>