PDFium Delphi Component 文件

RenewPadesArchiveTimestamp 方法

元件: TPdf  ·  單元: PDFium
將新的封存 Document Time-stamp 附加到既有的 PAdES 簽章鏈結

Syntax

function RenewPadesArchiveTimestamp(const FileName: string; const Options: TPadesArchiveTimestampOptions; out Report: TPadesArchiveTimestampReport): Boolean;

function RenewPadesArchiveTimestampToStream(Stream: TStream; const Options: TPadesArchiveTimestampOptions; out Report: TPadesArchiveTimestampReport): Boolean;

Description

讀取作用中元件保留的原始檔案、記憶體緩衝區、自訂資料流或已完成的漸進式來源,並附加增量式的 RFC 3161 Document Time-stamp,其 ByteRange 涵蓋所有先前的修訂版本

當 UpdateDss 為 True 時,會在時間戳記之前附加所提供的完整憑證、OCSP、CRL 與 VRI 資料,使回傳的權杖保護更新後的長期驗證狀態

只有在附加欄位可被探索且結構驗證回報 PAdES B-LTA 之後,才會寫入輸出

Parameters

FileName由完整暫存結果寫入的目的地路徑
Stream目的地資料流,只有在成功更新後才會清除並填入
OptionsTSA URL、nonce、權杖容量,以及可選的完整 DSS 替換資料
Report來源與結果等級、時間戳記計數、位元組長度、DSS 更新狀態、產生時間、政策 OID 與 nonce

Remarks

Example

var
  Options: TPadesArchiveTimestampOptions;
  Report: TPadesArchiveTimestampReport;
begin
  Options := TPadesArchiveTimestampOptions.Default;
  Options.TsaUrl := 'https://tsa.example.test';
  Options.Nonce := 42;
  if Pdf1.RenewPadesArchiveTimestamp('renewed.pdf', Options, Report) then
    ShowMessage(Format('%d archival timestamps', [Report.ResultDocTimeStampCount]));
end;

See Also

ValidatePades SaveAsPadesDss SignPades