Table of contents
Namespace: Com\Tecnick\Pdf\Sign\Output
Final: Yes
File: Dss.php line 49
Emits the Document Security Store (DSS) PDF objects for a signature: the certificate, OCSP, and CRL streams, a VRI entry, and the DSS dictionary. The object number is passed by reference and advanced, and the emitted object bodies are returned keyed by number. Stream encryption is delegated to an optional encryptor callable so the emitter does not depend on the host encryption object.
The VRI key is the uppercase base-16 SHA-1 digest of the signature Contents bytes, per ISO 32000-2 clause 12.8.4.3.
A DSS written by an incremental update replaces the one before it. Pass the previous state as $existing and its VRI entries and object references are merged into the new dictionary instead of being dropped. Material an earlier revision already wrote is referenced again rather than written a second time.
Tags
- since: 2026-07-15
- category: Library
- author: Nicola Asuni info@tecnick.com
- copyright: 2026 Nicola Asuni - Tecnick.com LTD
- license: https://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE)
- link: https://github.com/tecnickcom/tc-lib-pdf-sign
Methods
emit()
File: Dss.php line 74
public emit(array{certs: list, ocsp: list, crls: list} $material, string $signatureContents, int &$pon[, callable|null $encryptor = null ][, array{vri: array, certs: list, ocsp: list, crls: list, objects?: array}|null $existing = null ]) : array{objects: array, object_id: int, state: array{vri: array, certs: list, ocsp: list, crls: list, objects: array}}
Parameters
- $material : array{certs: list, ocsp: list, crls: list}
- $signatureContents : string: Signature /Contents bytes (hex-decoded, including any placeholder padding), hashed for the VRI key.
- $pon : int: Current object number; advanced by reference.
- $encryptor : callable|null = null: Optional fn(string $data, int $objectId): string.
- $existing : array{vri: array, certs: list, ocsp: list, crls: list, objects?: array}|null = null: State returned by a previous emit() for the same document, carried forward into the new dictionary.
Tags
- throws: Exception If the object number, the signature contents, the material, or the carried state is invalid, or the encryptor returns a non-string value.
Return values
array{objects: array, object_id: int, state: array{vri: array, certs: list, ocsp: list, crls: list, objects: array}} —
The emitted object bodies keyed by object number, the DSS dictionary object number (0 when there is nothing to emit), and the state to pass back as $existing on the next incremental update.