Ensure attachments are re-encryptable to same digest

This commit is contained in:
trevor-signal 2024-10-04 01:52:29 -04:00 committed by GitHub
parent 7d25988888
commit 6e1fd5958e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 1250 additions and 295 deletions

View file

@ -78,7 +78,14 @@ export const downscaleOutgoingAttachment = async (
export type CdnFieldsType = Pick<
AttachmentType,
'cdnId' | 'cdnKey' | 'cdnNumber' | 'key' | 'digest' | 'iv' | 'plaintextHash'
| 'cdnId'
| 'cdnKey'
| 'cdnNumber'
| 'key'
| 'digest'
| 'iv'
| 'plaintextHash'
| 'isReencryptableToSameDigest'
>;
export function copyCdnFields(
@ -95,5 +102,6 @@ export function copyCdnFields(
iv: Bytes.toBase64(uploaded.iv),
digest: Bytes.toBase64(uploaded.digest),
plaintextHash: uploaded.plaintextHash,
isReencryptableToSameDigest: uploaded.isReencryptableToSameDigest,
};
}