XML Signer allows you to sign XML documents using X.509 digital certificates.
You can install the xml-signer in 2 different ways:
Install it via Composer
$ composer require martinusso/xml-signer
Or, clone the Git repository (https://github.com/martinusso/xml-signer).
$password = '.pfx password here!';
$pfx = file_get_contents('path/to/certificate.pfx');
$certificate = Certificate::readPfx($pfx, $password);
$signer = new Signer($certificate);
$xmlSigned = $signer->xml($XmlContent, $tagName);
Please refer to CONTRIBUTING.md for information on how to contribute to XmlSigner
This library is released under the MIT license.