Table of contents
Namespace: Com\Tecnick\Pdf\Sign\Cms
enum SignatureEncoding: string
Source: src/Cms/SignatureEncoding.php:40
Backed enum for the encoding of a signature handed to Builder::buildFromSignature(). CMS carries an ECDSA signature as the DER SEQUENCE of the two integers, while some hardware tokens and remote signing services return the fixed-width concatenation defined by IEEE P1363. The case selects which one is supplied. An RSA signature is always Der.
Cases
Der = 'der': The signature is already encoded as CMS requires it.P1363 = 'p1363': ECDSA signature as the fixed-width concatenation r || s (IEEE P1363).
Methods
fromLoose()
Resolve a loose signature encoding value to the matching enum case.
Accepts the canonical encoding string or an enum instance (returned unchanged). Unknown values throw.
public static fromLoose(string|self $value): self
Parameters:
$value(string|self): Signature encoding name or enum case.
Returns: self
Throws:
- Exception: if the value does not match a known signature encoding.
Source: src/Cms/SignatureEncoding.php:62