Attachments: support for incrementalMac and chunkSize
This commit is contained in:
parent
dbf057856f
commit
b51a0e0298
19 changed files with 322 additions and 69 deletions
|
@ -81,11 +81,13 @@ export type CdnFieldsType = Pick<
|
|||
| 'cdnId'
|
||||
| 'cdnKey'
|
||||
| 'cdnNumber'
|
||||
| 'key'
|
||||
| 'digest'
|
||||
| 'iv'
|
||||
| 'plaintextHash'
|
||||
| 'incrementalMac'
|
||||
| 'incrementalMacChunkSize'
|
||||
| 'isReencryptableToSameDigest'
|
||||
| 'iv'
|
||||
| 'key'
|
||||
| 'plaintextHash'
|
||||
>;
|
||||
|
||||
export function copyCdnFields(
|
||||
|
@ -98,10 +100,14 @@ export function copyCdnFields(
|
|||
cdnId: dropNull(uploaded.cdnId)?.toString(),
|
||||
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,
|
||||
incrementalMac: uploaded.incrementalMac
|
||||
? Bytes.toBase64(uploaded.incrementalMac)
|
||||
: undefined,
|
||||
incrementalMacChunkSize: dropNull(uploaded.chunkSize),
|
||||
isReencryptableToSameDigest: uploaded.isReencryptableToSameDigest,
|
||||
iv: Bytes.toBase64(uploaded.iv),
|
||||
key: Bytes.toBase64(uploaded.key),
|
||||
plaintextHash: uploaded.plaintextHash,
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue