Ensure attachments are re-encryptable to same digest
This commit is contained in:
parent
7d25988888
commit
6e1fd5958e
20 changed files with 1250 additions and 295 deletions
|
@ -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,
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue