TSha512Digest = array[0..63] of Byte;
TSha384Digest = array[0..47] of Byte;
TSha512Context = record
State: array[0..7] of UInt64;
CountLo: UInt64;
CountHi: UInt64;
Buffer: array[0..127] of Byte;
BufLen: Integer;
Is384: Boolean;
end;
procedure Sha512Init(out Ctx: TSha512Context);
procedure Sha384Init(out Ctx: TSha512Context);
procedure Sha512Update(var Ctx: TSha512Context; const Buf; BufLen: Integer);
procedure Sha512Final(var Ctx: TSha512Context; out Digest: TSha512Digest);
procedure Sha384Final(var Ctx: TSha512Context; out Digest: TSha384Digest);
function Sha512Bytes(const B: TBytes): TSha512Digest;
function Sha384Bytes(const B: TBytes): TSha384Digest;
ينفِّذ FPdfSha512 دالتي تجزئة SHA-512 و SHA-384 فوق سياق كلمات 64 بت مشترك. يختار العلم Is384 في السياق متغير SHA-384 المقتطع عند التهيئة عبر Sha384Init
تعكس واجهة برمجة التطبيقات التزايدية FPdfSha256: هيِّئ سياقًا، وأطعم المخازن بـ Sha512Update، وأنهِ إلى ملخص SHA-512 من 64 بايتًا أو ملخص SHA-384 من 48 بايتًا. يعد Sha512Bytes و Sha384Bytes مساعدي لمرة واحدة فوق مصفوفة بايتات
| الدالة | الوصف |
|---|---|
Sha512Init | يهيِّئ سياق SHA-512 |
Sha384Init | يهيِّئ سياق SHA-384 (يعيِّن العلم الداخلي Is384) |
Sha512Update | يُغذي مخزنًا غير مُنمَّط في سياق SHA-512 أو SHA-384 مفتوح |
Sha512Final | ينهي سياق SHA-512 ويعيد الملخص البالغ 64 بايتًا |
Sha384Final | ينهي سياق SHA-384 ويعيد الملخص البالغ 48 بايتًا |
Sha512Bytes | تجزئة SHA-512 لمرة واحدة لمصفوفة بايتات |
Sha384Bytes | تجزئة SHA-384 لمرة واحدة لمصفوفة بايتات |
| النوع | الوصف |
|---|---|
TSha512Digest | ملخص SHA-512 من 64 بايتًا |
TSha384Digest | ملخص SHA-384 من 48 بايتًا |
TSha512Context | سياق تزايدي مشترك لـ SHA-512 و SHA-384 |
TSha512Context مع العلم Is384 الذي يعيِّنه Sha384InitSha...، بخلاف الأسماء المكتوبة بأحرف كبيرة SHA256... في FPdfSha256