Changeset View
Changeset View
Standalone View
Standalone View
web/media/encryption-utils.js
Show First 20 Lines • Show All 63 Lines • ▼ Show 20 Lines | try { | ||||
success = false; | success = false; | ||||
exceptionMessage = getMessageForException(e); | exceptionMessage = getMessageForException(e); | ||||
} | } | ||||
steps.push({ | steps.push({ | ||||
step: 'encrypt_data', | step: 'encrypt_data', | ||||
dataSize: encryptedData?.byteLength ?? -1, | dataSize: encryptedData?.byteLength ?? -1, | ||||
isPadded: shouldPad, | isPadded: shouldPad, | ||||
time: Date.now() - startEncrypt, | time: Date.now() - startEncrypt, | ||||
sha256: null, | |||||
success, | success, | ||||
exceptionMessage, | exceptionMessage, | ||||
}); | }); | ||||
if (!success || !encryptedData || !key) { | if (!success || !encryptedData || !key) { | ||||
return { steps, result: { success: false, reason: 'encryption_failed' } }; | return { steps, result: { success: false, reason: 'encryption_failed' } }; | ||||
} | } | ||||
// Step 3: Create a File from the encrypted data | // Step 3: Create a File from the encrypted data | ||||
▲ Show 20 Lines • Show All 151 Lines • Show Last 20 Lines |