export type ChecksumOutcome = { ok: true; } | { ok: false; message: string; expected: string; actual: string; }; /** * AR: يقارن بصمة الملفّ المنزَّل بالبصمة الموثوقة. * * ويُفحَص الحجم أوّلًا لأنه يفرّق سببين بعلاجين: ملفٌّ **أقصر** يعني اتصالًا قُطع، وعلاجُه * إعادةُ التنزيل؛ وملفٌّ بالحجم الصحيح ببصمة مختلفة يعني **تبديلًا أو تلفًا**، وعلاجه * ليس إعادة المحاولة. رسالةٌ واحدة لكليهما تُرسل الفنيّ في الاتجاه الخطأ نصف الوقت. * EN: Compares the downloaded file's digest against the trusted one. * * Size is checked first because it separates two causes with two remedies: a **shorter** file * means a cut connection and the remedy is downloading again; a file of the right size with a * different digest means **substitution or corruption**, and retrying is not the remedy. One * message for both sends the technician the wrong way half the time. */ export declare function verifyChecksum(file: string, expectedSha256: string, expectedBytes: number): Promise; /** يحسب البصمة بالبثّ. نصف غيغابايت في ذاكرة جهاز الاستراحة يقتله. */ export declare function sha256Of(file: string): Promise; //# sourceMappingURL=verify.d.ts.map