/** * DOCX Font Obfuscation (ODTTF format) * * Per ECMA-376 Part 3, Section 4, embedded TrueType fonts may be obfuscated by * XOR-ing the first 32 bytes of the font file with a 16-byte GUID repeated twice. * * The GUID in the w:fontKey attribute is in the form "{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" * but bytes are applied in a specific order derived from the GUID. */ /** * Deobfuscate ODTTF font data to raw TTF/OTF. * * @param data - The obfuscated font data (first 32 bytes are obfuscated). * @param fontKey - The GUID from w:fontKey attribute. * @returns The deobfuscated font data (new buffer). */ export declare function deobfuscateFont(data: Uint8Array, fontKey: string): Uint8Array; /** * Obfuscate a raw TTF/OTF font to ODTTF format. * * @param data - The raw font data. * @param fontKey - The GUID to use for obfuscation (also stored in w:fontKey). * @returns The obfuscated font data (new buffer). */ export declare function obfuscateFont(data: Uint8Array, fontKey: string): Uint8Array; /** * Generate a new random GUID suitable for w:fontKey. * * @returns A GUID string in the form "{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" */ export declare function generateFontKey(): string;