PHPackages                             schno01/xmlseclibs-deid - 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. [Security](/categories/security)
4. /
5. schno01/xmlseclibs-deid

ActiveLibrary[Security](/categories/security)

schno01/xmlseclibs-deid
=======================

A PHP library for XML Security for bundID/deutschlandID

0561PHP

Since Jun 17Pushed 10mo agoCompare

[ Source](https://github.com/schno01/xmlseclibs-deid)[ Packagist](https://packagist.org/packages/schno01/xmlseclibs-deid)[ RSS](/packages/schno01-xmlseclibs-deid/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (1)

\#xmlseclibs

xmlseclibs is a library written in PHP for working with XML Encryption and Signatures.

The author of xmlseclibs is Rob Richards.

Branches
========

[](#branches)

Master is currently the only actively maintained branch.

- master/3.1: Added AES-GCM support requiring 7.1+
- 3.0: Removes mcrypt usage requiring 5.4+ (5.6.24+ recommended for security reasons)
- 2.0: Contains namespace support requiring 5.3+
- 1.4: Contains auto-loader support while also maintaining backwards compatiblity with the older 1.3 version using the xmlseclibs.php file. Supports PHP 5.2+

Requirements
============

[](#requirements)

xmlseclibs requires PHP version 5.4 or greater. **5.6.24+ recommended for security reasons**

How to Install
--------------

[](#how-to-install)

Install with [`composer.phar`](http://getcomposer.org).

```
php composer.phar require "robrichards/xmlseclibs"
```

Use cases
---------

[](#use-cases)

xmlseclibs is being used in many different software.

- [SimpleSAMLPHP](https://github.com/simplesamlphp/simplesamlphp)
- [LightSAML](https://github.com/lightsaml/lightsaml)
- [OneLogin](https://github.com/onelogin/php-saml)

Basic usage
-----------

[](#basic-usage)

The example below shows basic usage of xmlseclibs, with a SHA-256 signature.

```
use RobRichards\XMLSecLibs\XMLSecurityDSig;
use RobRichards\XMLSecLibs\XMLSecurityKey;

// Load the XML to be signed
$doc = new DOMDocument();
$doc->load('./path/to/file/tobesigned.xml');

// Create a new Security object
$objDSig = new XMLSecurityDSig();
// Use the c14n exclusive canonicalization
$objDSig->setCanonicalMethod(XMLSecurityDSig::EXC_C14N);
// Sign using SHA-256
$objDSig->addReference(
    $doc,
    XMLSecurityDSig::SHA256,
    array('http://www.w3.org/2000/09/xmldsig#enveloped-signature')
);

// Create a new (private) Security key
$objKey = new XMLSecurityKey(XMLSecurityKey::RSA_SHA256, array('type'=>'private'));
/*
If key has a passphrase, set it using
$objKey->passphrase = '';
*/
// Load the private key
$objKey->loadKey('./path/to/privatekey.pem', TRUE);

// Sign the XML file
$objDSig->sign($objKey);

// Add the associated public key to the signature
$objDSig->add509Cert(file_get_contents('./path/to/file/mycert.pem'));

// Append the signature to the XML
$objDSig->appendSignature($doc->documentElement);
// Save the signed XML
$doc->save('./path/to/signed.xml');
```

How to Contribute
-----------------

[](#how-to-contribute)

- [Open Issues](https://github.com/robrichards/xmlseclibs/issues)
- [Open Pull Requests](https://github.com/robrichards/xmlseclibs/pulls)

Mailing List:

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity14

Early-stage or recently created project

 Bus Factor1

Top contributor holds 67.1% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/765535d4caa6e1167a839d4a475fab112d6763e2488ef08ae127a965987437f2?d=identicon)[schno01](/maintainers/schno01)

---

Top Contributors

[![robrichards](https://avatars.githubusercontent.com/u/210629?v=4)](https://github.com/robrichards "robrichards (114 commits)")[![jaimeperez](https://avatars.githubusercontent.com/u/1942728?v=4)](https://github.com/jaimeperez "jaimeperez (11 commits)")[![thijskh](https://avatars.githubusercontent.com/u/3808792?v=4)](https://github.com/thijskh "thijskh (7 commits)")[![Maks3w](https://avatars.githubusercontent.com/u/1301698?v=4)](https://github.com/Maks3w "Maks3w (6 commits)")[![RichWeber](https://avatars.githubusercontent.com/u/1702252?v=4)](https://github.com/RichWeber "RichWeber (4 commits)")[![gfaust-qb](https://avatars.githubusercontent.com/u/13354975?v=4)](https://github.com/gfaust-qb "gfaust-qb (3 commits)")[![hiddewie](https://avatars.githubusercontent.com/u/1073881?v=4)](https://github.com/hiddewie "hiddewie (3 commits)")[![tmilos](https://avatars.githubusercontent.com/u/1818373?v=4)](https://github.com/tmilos "tmilos (3 commits)")[![klemenb](https://avatars.githubusercontent.com/u/2099210?v=4)](https://github.com/klemenb "klemenb (3 commits)")[![tvdijen](https://avatars.githubusercontent.com/u/841045?v=4)](https://github.com/tvdijen "tvdijen (2 commits)")[![restena-sw](https://avatars.githubusercontent.com/u/6346943?v=4)](https://github.com/restena-sw "restena-sw (2 commits)")[![schno01](https://avatars.githubusercontent.com/u/88664659?v=4)](https://github.com/schno01 "schno01 (2 commits)")[![iggyvolz](https://avatars.githubusercontent.com/u/2197376?v=4)](https://github.com/iggyvolz "iggyvolz (1 commits)")[![h3xx](https://avatars.githubusercontent.com/u/615684?v=4)](https://github.com/h3xx "h3xx (1 commits)")[![sammarshallou](https://avatars.githubusercontent.com/u/68663?v=4)](https://github.com/sammarshallou "sammarshallou (1 commits)")[![sbacelic](https://avatars.githubusercontent.com/u/647434?v=4)](https://github.com/sbacelic "sbacelic (1 commits)")[![BernardoSilva](https://avatars.githubusercontent.com/u/1537510?v=4)](https://github.com/BernardoSilva "BernardoSilva (1 commits)")[![SharkMachine](https://avatars.githubusercontent.com/u/7488694?v=4)](https://github.com/SharkMachine "SharkMachine (1 commits)")[![Slamdunk](https://avatars.githubusercontent.com/u/152236?v=4)](https://github.com/Slamdunk "Slamdunk (1 commits)")[![dvaeversted](https://avatars.githubusercontent.com/u/1611810?v=4)](https://github.com/dvaeversted "dvaeversted (1 commits)")

### Embed Badge

![Health badge](/badges/schno01-xmlseclibs-deid/health.svg)

```
[![Health](https://phpackages.com/badges/schno01-xmlseclibs-deid/health.svg)](https://phpackages.com/packages/schno01-xmlseclibs-deid)
```

###  Alternatives

[defuse/php-encryption

Secure PHP Encryption Library

3.9k162.4M214](/packages/defuse-php-encryption)[roave/security-advisories

Prevents installation of composer packages with known security vulnerabilities: no API, simply require it

2.9k97.3M6.4k](/packages/roave-security-advisories)[mews/purifier

Laravel 5/6/7/8/9/10 HtmlPurifier Package

2.0k16.7M113](/packages/mews-purifier)[robrichards/xmlseclibs

A PHP library for XML Security

41278.1M118](/packages/robrichards-xmlseclibs)[bjeavons/zxcvbn-php

Realistic password strength estimation PHP library based on Zxcvbn JS

86917.5M63](/packages/bjeavons-zxcvbn-php)[enlightn/security-checker

A PHP dependency vulnerabilities scanner based on the Security Advisories Database.

33732.2M110](/packages/enlightn-security-checker)

PHPackages © 2026

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