Attachments: support for incrementalMac and chunkSize
Co-authored-by: Scott Nonnenberg <scott@signal.org>
This commit is contained in:
parent
4834e3ddc2
commit
aaf9e1a418
19 changed files with 322 additions and 69 deletions
|
@ -94,6 +94,7 @@ export async function attemptToReencryptToOriginalDigest(
|
|||
attachment.path
|
||||
),
|
||||
},
|
||||
needIncrementalMac: false,
|
||||
getAbsoluteAttachmentPath:
|
||||
window.Signal.Migrations.getAbsoluteAttachmentPath,
|
||||
});
|
||||
|
@ -117,6 +118,7 @@ export async function attemptToReencryptToOriginalDigest(
|
|||
encryptAttachmentV2({
|
||||
plaintext: {
|
||||
stream: passthrough,
|
||||
size: attachment.size,
|
||||
},
|
||||
keys: fromBase64(key),
|
||||
dangerousIv: {
|
||||
|
@ -124,6 +126,7 @@ export async function attemptToReencryptToOriginalDigest(
|
|||
reason: 'reencrypting-for-backup',
|
||||
digestToMatch: fromBase64(digest),
|
||||
},
|
||||
needIncrementalMac: false,
|
||||
getAbsoluteAttachmentPath:
|
||||
window.Signal.Migrations.getAbsoluteAttachmentPath,
|
||||
}),
|
||||
|
@ -146,6 +149,7 @@ export async function generateNewEncryptionInfoForAttachment(
|
|||
attachment.path
|
||||
),
|
||||
},
|
||||
needIncrementalMac: false,
|
||||
getAbsoluteAttachmentPath:
|
||||
window.Signal.Migrations.getAbsoluteAttachmentPath,
|
||||
});
|
||||
|
@ -170,7 +174,9 @@ export async function generateNewEncryptionInfoForAttachment(
|
|||
keys: newKeys,
|
||||
plaintext: {
|
||||
stream: passthrough,
|
||||
size: attachment.size,
|
||||
},
|
||||
needIncrementalMac: false,
|
||||
getAbsoluteAttachmentPath:
|
||||
window.Signal.Migrations.getAbsoluteAttachmentPath,
|
||||
}),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue