new PasteDecrypter()
(controller) Responsible for decrypting cipherdata and passing data to view.
Only decryption, no download.
- Source:
Methods
(async, private, static) decryptComments(paste, key, password) → {Promise}
decrypts all comments and shows them
Parameters:
Name | Type | Description |
---|---|---|
paste |
Paste | paste data in object form |
key |
string | |
password |
string |
- Source:
Returns:
- Type
- Promise
(async, private, static) decryptOrPromptPassword(key, password, cipherdata) → {false|string}
decrypt data or prompts for password in case of failure
Parameters:
Name | Type | Description |
---|---|---|
key |
string | |
password |
string | optional, may be an empty string |
cipherdata |
string |
- Source:
Throws:
string
Returns:
false, when unsuccessful or string (decrypted data)
- Type
- false | string
(async, private, static) decryptPaste(paste, key, password) → {Promise}
decrypt the actual paste text
Parameters:
Name | Type | Description |
---|---|---|
paste |
Paste | paste data in object form |
key |
string | |
password |
string |
- Source:
Throws:
string
Returns:
- Type
- Promise
(static) run(pasteopt)
show decrypted text in the display area, including discussion (if open)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
paste |
Paste |
<optional> |
(optional) object including comments to display (items = array with keys ('data','meta')) |
- Source: