Store IV when encrypting or decrypting attachments
This commit is contained in:
parent
63be4299f4
commit
e9b661873b
6 changed files with 136 additions and 11 deletions
|
@ -77,7 +77,7 @@ export const downscaleOutgoingAttachment = async (
|
|||
|
||||
export type CdnFieldsType = Pick<
|
||||
AttachmentType,
|
||||
'cdnId' | 'cdnKey' | 'cdnNumber' | 'key' | 'digest' | 'plaintextHash'
|
||||
'cdnId' | 'cdnKey' | 'cdnNumber' | 'key' | 'digest' | 'iv' | 'plaintextHash'
|
||||
>;
|
||||
|
||||
export function copyCdnFields(
|
||||
|
@ -91,6 +91,7 @@ export function copyCdnFields(
|
|||
cdnKey: uploaded.cdnKey,
|
||||
cdnNumber: dropNull(uploaded.cdnNumber),
|
||||
key: Bytes.toBase64(uploaded.key),
|
||||
iv: Bytes.toBase64(uploaded.iv),
|
||||
digest: Bytes.toBase64(uploaded.digest),
|
||||
plaintextHash: uploaded.plaintextHash,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue