* Log decryption operation * @param {String} source - source that triggered encryption operation * @param {KeyringBase} keyring * @param {Array } keyIds - ids of used keys * @param {String|Array} [senderAddress] - email address of sender, used to record keyserver-sent mail.
(source, keyring, keyIds, senderAddress)
| 226 | * @param {String|Array} [senderAddress] - email address of sender, used to record keyserver-sent mail. |
| 227 | */ |
| 228 | async function logDecryption(source, keyring, keyIds, senderAddress) { |
| 229 | if (source) { |
| 230 | const key = keyring.getPrivateKeyByIds(keyIds); |
| 231 | const {userId} = await getUserInfo(key, false); |
| 232 | uiLog.push(source, 'security_log_decryption_operation', [userId], false); |
| 233 | // Share only whether the sender was the keyserver, not the actual address. |
| 234 | if (senderAddress && senderAddress.includes(KEYSERVER_ADDRESS)) { |
| 235 | recordOnboardingStep(COMMUNICATION, 'Decryption (from Keyserver)'); |
| 236 | } else { |
| 237 | recordOnboardingStep(COMMUNICATION, 'Decryption'); |
| 238 | } |
| 239 | } |
| 240 | } |
| 241 | |
| 242 | async function readCleartextMessage(armoredText) { |
| 243 | try { |
no test coverage detected