tw5-typed / modules/utils/crypto
Module: modules/utils/crypto
Table of contents
Functions
Functions
decryptStoreArea
▸ decryptStoreArea(encryptedStoreArea, password?): any[] | null
Attempts to decrypt an encrypted store area using the provided password.
Parameters
| Name | Type | Description |
|---|---|---|
encryptedStoreArea | string | The encrypted store area to decrypt. |
password? | string | The password to use for decryption. |
Returns
any[] | null
An array of decrypted tiddlers, or null if decryption fails.
Defined in
src/modules/utils/crypto.d.ts:15
decryptStoreAreaInteractive
▸ decryptStoreAreaInteractive(encryptedStoreArea, callback, options?): void
Prompts the user for a password and attempts to decrypt an encrypted store area using the provided password.
Parameters
| Name | Type | Description |
|---|---|---|
encryptedStoreArea | string | The encrypted store area to decrypt. |
callback | (tiddlers: any[]) => void | The function to call with the decrypted tiddlers. |
options? | Object | Configuration options. |
options.usePasswordVault? | boolean | Whether to store the password in the system password vault. |
Returns
void
Defined in
src/modules/utils/crypto.d.ts:27
extractEncryptedStoreArea
▸ extractEncryptedStoreArea(text): string | null
Extracts an encrypted store area from a TiddlyWiki file.
Parameters
| Name | Type | Description |
|---|---|---|
text | string | The text of the TiddlyWiki file. |
Returns
string | null
The extracted encrypted store area, or null if not found.