Store IV when encrypting or decrypting attachments
This commit is contained in:
parent
1d5690acba
commit
85a75cb28f
6 changed files with 136 additions and 11 deletions
|
@ -132,7 +132,7 @@ export async function downloadAttachment(
|
|||
window.Signal.Migrations.getAbsoluteAttachmentPath(downloadedPath);
|
||||
|
||||
const { aesKey, macKey } = splitKeys(Bytes.fromBase64(key));
|
||||
const { path, plaintextHash } = await decryptAttachmentV2({
|
||||
const { path, plaintextHash, iv } = await decryptAttachmentV2({
|
||||
ciphertextPath: cipherTextAbsolutePath,
|
||||
idForLogging: logId,
|
||||
aesKey,
|
||||
|
@ -155,6 +155,7 @@ export async function downloadAttachment(
|
|||
? MIME.stringToMIMEType(contentType)
|
||||
: MIME.APPLICATION_OCTET_STREAM,
|
||||
plaintextHash,
|
||||
iv: Bytes.toBase64(iv),
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue