/** * Decode an AES key from CDNMedia.aes_key (base64-encoded). * Two formats exist: * A: base64(raw 16 bytes) → decoded length = 16 → use directly * B: base64(hex string 32 ASCII chars) → decoded length = 32 → hex-decode to 16 bytes */ export declare function decodeAesKey(aesKeyBase64: string): Buffer; /** * Decode an AES key from image_item.aeskey (raw 32-char hex string). */ export declare function decodeHexAesKey(hexKey: string): Buffer; /** * Encrypt plaintext with AES-128-ECB + PKCS7 padding. */ export declare function encryptAesEcb(plaintext: Buffer, key: Buffer): Buffer; /** * Decrypt AES-128-ECB + PKCS7 ciphertext. */ export declare function decryptAesEcb(ciphertext: Buffer, key: Buffer): Buffer; /** * Calculate AES-128-ECB ciphertext size (with PKCS7 padding). * Formula: ceil((rawsize + 1) / 16) * 16 */ export declare function calcEncryptedSize(rawSize: number): number; /** * Generate a random 16-byte AES key as hex string (for uploads). */ export declare function randomAesKeyHex(): string; /** * Generate X-WECHAT-UIN header value: * random uint32 → decimal string → base64 */ export declare function randomWechatUin(): string; //# sourceMappingURL=crypto.d.ts.map