Deduplicate incoming attachments on disk

Co-authored-by: trevor-signal <131492920+trevor-signal@users.noreply.github.com>
This commit is contained in:
automated-signal
2026-02-09 11:37:27 -06:00
committed by GitHub
parent 23b0da737d
commit ed381109f5
51 changed files with 1727 additions and 560 deletions
+18
View File
@@ -0,0 +1,18 @@
// Copyright 2026 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import * as Bytes from '../Bytes.std.js';
import { getRandomBytes } from '../Crypto.node.js';
export function testPlaintextHash(): string {
return Bytes.toHex(getRandomBytes(32));
}
export function testAttachmentKey(): string {
return Bytes.toBase64(getRandomBytes(64));
}
export function testAttachmentLocalKey(): string {
return Bytes.toBase64(getRandomBytes(32));
}
export function testAttachmentDigest(): string {
return Bytes.toBase64(getRandomBytes(32));
}