* Log encryption operation * @param {String} source - source that triggered encryption operation * @param {KeyringBase} keyring * @param {Array } keyFprs - fingerprint of used keys
(source, keyring, keyFprs)
| 207 | * @param {Array<String>} keyFprs - fingerprint of used keys |
| 208 | */ |
| 209 | async function logEncryption(source, keyring, keyFprs) { |
| 210 | if (source) { |
| 211 | const keys = keyring.getKeysByFprs(keyFprs); |
| 212 | const recipients = await Promise.all(keys.map(async key => { |
| 213 | const {userId} = await getUserInfo(key, {allowInvalid: true}); |
| 214 | return userId; |
| 215 | })); |
| 216 | uiLog.push(source, 'security_log_encryption_operation', [recipients.join(', ')], false); |
| 217 | recordOnboardingStep(COMMUNICATION, 'Encryption'); |
| 218 | } |
| 219 | } |
| 220 | |
| 221 | /** |
| 222 | * Log decryption operation |
no test coverage detected