/** Lowercase hex SHA-256 of a file's contents, streamed so large files are never buffered whole. */ export async function sha256File(filePath: string): Promise { const hasher = new Bun.CryptoHasher("sha256"); for await (const chunk of Bun.file(filePath).stream()) hasher.update(chunk); return hasher.digest("hex"); }