greenter/xmldsig
PHP library for signing SUNAT electronic invoices in Peru. Load a PEM certificate and sign XML files or strings, adding the required ds:Signature block with transforms, digest and RSA signature to your comprobantes.
openssl)..PEM certificates (supports conversion from .PFX via provided guide). Avoid if your workflow relies on other formats (e.g., .p12).openssl, PHP’s XML-DSig tooling) remain options if you want full control.For Executives: "This PHP package lets us comply with Peru’s SUNAT e-invoicing rules—saving us 3–6 months of dev time by avoiding custom XML signing logic. The latest release directly de-risks the two concerns we had: it now has automated CI and the signing algorithms are configurable, which means we’re not stuck on outdated defaults if SUNAT tightens requirements. It remains a lightweight, low-cost ‘buy’ that de-risks compliance and accelerates time-to-market."
For Engineering:
"The greenter/xmldsig package provides a battle-tested way to sign XML documents per SUNAT’s standards using RSA keys in .PEM format. v5.1.0 adds two things that matter to us: GitHub Actions CI (regression safety on upgrades) and configurable signature/digest algorithms (we can pin SHA-256 instead of relying on legacy defaults). It’s a thin wrapper around XMLSecLibs, so we’d still need to:
For Compliance/Legal: "This package directly addresses SUNAT’s technical requirements for digital signatures in electronic invoices. With v5.1.0 we can explicitly configure the signature and digest algorithms rather than inheriting defaults, which makes it easier to evidence alignment with current SUNAT resolutions and to move off SHA-1 where required. We’ll need to confirm the exact algorithm combination against [current SUNAT resolution] and document that configuration choice for audit purposes."
How can I help you explore Laravel packages today?