PDFium Component Docs

FPdfHmac unit

Unit: FPdfHmac
Vrijstaande HMAC-SHA256- en HKDF-SHA256-primitieven zoals gebruikt bij PDF MAC-sleutelafleiding en authenticatie

Syntax

function HmacSha256(const Key, Data: TBytes): TSHA256Digest;
function HkdfSha256(const InputKeyMaterial, Salt, Info: TBytes;
  OutputLength: Integer): TBytes;
function ConstantTimeBytesEqual(const Left, Right: TBytes): Boolean;
procedure SecureClearBytes(var Data: TBytes);

Description

HmacSha256 implementeert RFC 2104-authenticatie over willekeurige byte-arrays en hasht sleutels die langer zijn dan de SHA-256-blokgrootte voordat de inner- en outer-pads worden opgebouwd

HkdfSha256 implementeert RFC 5869 extract-and-expand-afleiding met uitvoerlengtes van nul tot en met 8160 bytes

ConstantTimeBytesEqual vergelijkt zowel content als lengte zonder bij de eerste mismatch terug te keren, terwijl SecureClearBytes beheerde byte-opslag wist voordat deze wordt vrijgegeven

See Also

FPdfSha256, FPdfMac, FPdfEncrypt