PHPackages                             martinusso/xml-signer - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. martinusso/xml-signer

AbandonedArchivedLibrary[Parsing &amp; Serialization](/categories/parsing)

martinusso/xml-signer
=====================

XML Signer allows you to sign XML documents

1.0.0(8y ago)2185[1 issues](https://github.com/martinusso/xml-signer/issues)MITPHPPHP ^5.6 || ^7.0

Since Oct 17Pushed 8y agoCompare

[ Source](https://github.com/martinusso/xml-signer)[ Packagist](https://packagist.org/packages/martinusso/xml-signer)[ Docs](https://github.com/martinusso/xml-signer)[ RSS](/packages/martinusso-xml-signer/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

xml-signer
----------

[](#xml-signer)

[![Build Status](https://camo.githubusercontent.com/42b1f8b0cdfbd983355dff1a08ee92ab92fd7d7fe7351c78bb35032fabcfe34a/68747470733a2f2f7472617669732d63692e6f72672f6d617274696e7573736f2f786d6c2d7369676e65722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/martinusso/xml-signer)[![Build Status](https://camo.githubusercontent.com/f9409a3a6adda41b6f555964bdc95c0565fc78d1a94f049c807f13f7f90d331b/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d617274696e7573736f2f786d6c2d7369676e65722f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/martinusso/xml-signer/build-status/master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/5ba0b863ff88bd23a533cc34f45fcfa3e5ab43fc183b6fe8d532a36afdd025d5/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d617274696e7573736f2f786d6c2d7369676e65722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/martinusso/xml-signer/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/4cab6a133623a10f82f84e80d6f281df995f707958673e3bd47ee1737f0ec52d/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d617274696e7573736f2f786d6c2d7369676e65722f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/martinusso/xml-signer/?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/388c0214b0a79d7499fb56883632c0da5986d9c47e65a8f08761542a703c76b6/68747470733a2f2f706f7365722e707567782e6f72672f6d617274696e7573736f2f786d6c2d7369676e65722f762f737461626c65)](https://packagist.org/packages/martinusso/xml-signer)[![Latest Unstable Version](https://camo.githubusercontent.com/73b9212898024f63f251b6a2f8a01560ee60ee17f31a1487408deec8b9b7b3ee/68747470733a2f2f706f7365722e707567782e6f72672f6d617274696e7573736f2f786d6c2d7369676e65722f762f756e737461626c65)](https://packagist.org/packages/martinusso/xml-signer)[![composer.lock](https://camo.githubusercontent.com/68521222b6265d686ed273d3248556a4402f693ac2307fbd9b713f8eff8f7dad/68747470733a2f2f706f7365722e707567782e6f72672f6d617274696e7573736f2f786d6c2d7369676e65722f636f6d706f7365726c6f636b)](https://packagist.org/packages/martinusso/xml-signer)[![License](https://camo.githubusercontent.com/c858d544ffdc06f85c688ecbe5bfbd03476327c6d33606b56bcc4037fff006d1/68747470733a2f2f706f7365722e707567782e6f72672f6d617274696e7573736f2f786d6c2d7369676e65722f6c6963656e7365)](https://packagist.org/packages/martinusso/xml-signer)

XML Signer allows you to sign XML documents using X.509 digital certificates.

### Installation

[](#installation)

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`).

### How to use it

[](#how-to-use-it)

#### Instantiating a certificate object with PFX file

[](#instantiating-a-certificate-object-with-pfx-file)

```
$password = '.pfx password here!';
$pfx = file_get_contents('path/to/certificate.pfx');
$certificate = Certificate::readPfx($pfx, $password);

```

#### signing a xml

[](#signing-a-xml)

```
$signer = new Signer($certificate);
$xmlSigned = $signer->xml($XmlContent, $tagName);

```

### Contribute

[](#contribute)

Please refer to [CONTRIBUTING.md](https://github.com/martinusso/xml-signer/blob/master/CONTRIBUTING.md) for information on how to contribute to XmlSigner

### License

[](#license)

This library is released under the [MIT license](https://github.com/martinusso/xml-signer/blob/master/LICENSE).

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3136d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/055f0fd274c2261d698750c403323e930c4406adfee9f1dce50a13ef05bf2ba0?d=identicon)[martinusso](/maintainers/martinusso)

---

Top Contributors

[![martinusso](https://avatars.githubusercontent.com/u/158559?v=4)](https://github.com/martinusso "martinusso (25 commits)")

---

Tags

phpphp-librarysignaturexmlxmlcertificatesigner

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/martinusso-xml-signer/health.svg)

```
[![Health](https://phpackages.com/badges/martinusso-xml-signer/health.svg)](https://phpackages.com/packages/martinusso-xml-signer)
```

###  Alternatives

[masterminds/html5

An HTML5 parser and serializer.

1.8k242.8M229](/packages/masterminds-html5)[jms/serializer

Library for (de-)serializing data of any complexity; supports XML, and JSON.

2.3k135.8M851](/packages/jms-serializer)[jms/metadata

Class/method/property metadata management in PHP

1.8k152.8M88](/packages/jms-metadata)[jms/serializer-bundle

Allows you to easily serialize, and deserialize data of any complexity

1.8k89.3M627](/packages/jms-serializer-bundle)[hassankhan/config

Lightweight configuration file loader that supports PHP, INI, XML, JSON, and YAML files

97513.5M170](/packages/hassankhan-config)[sabre/xml

sabre/xml is an XML library that you may not hate.

52832.2M131](/packages/sabre-xml)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
