PHPackages                             markuspaks/xades-tools - 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. markuspaks/xades-tools

ActiveLibrary[Security](/categories/security)

markuspaks/xades-tools
======================

Sign files and verify signatures using XAdES

1.0.8(2y ago)0535↑433.3%1MITPHPPHP ^8.1

Since Sep 24Pushed 2y agoCompare

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

READMEChangelogDependencies (4)Versions (10)Used By (0)

API:
====

[](#api)

### Signing

[](#signing)

```
use XadesTools\Settings;
use XadesTools\Signature;
$settings = new Settings($pathToCertificate, $passphrase);
$xades = new Signature($settings);
$signedXmlAsString = $xades->signFile($file, $embed);
```

### Verification, content extraction

[](#verification-content-extraction)

```
use XadesTools\Verification;
$xades = new Verification();
$result = $xades->verifyFile($pathToXadesFile);
if ($result) {
    $content = $res->content; // binary content or plain text for xml files
    $signTime = $res->dateSigned; // DateTime object
    $signingSubject = $res->signingSubject; // array
} else {
    // Signature does not match signed content
}
```

COMMAND LINE USAGE:
===================

[](#command-line-usage)

### Signing file

[](#signing-file)

```
php bin/sign.php file cert pass [embed] [load-content]
```

Where:

- `file` - path to file we want to sign. Signature will be created in the same folder, with .XAdES extension
- `cert` - certificate in PKCS#12 format (.p12) - with private key
- `pass` - password for p12 file
- `embed` - if true, signature will embed given file
- `load-content` - loads file content into variable and signs it as embedded object

Results in `file.XAdES` located in the same directory as given `file`

### Verification

[](#verification)

```
php src/verify.php file [verbose]
```

Where:

- `file` is path to .XAdES file
- `verbose` if true print additional info about sign time and
- `load-content` - loads file content into variable and verifies it as embedded object (can not rely on files on disk)

Verifies content in given XAdES file, prints `OK` if everything passes, error message otherwise.

### Extracting file from XAdES files

[](#extracting-file-from-xades-files)

```
php src/extract.php file output
```

Where:

- `file` is path to .XAdES file with embedded object
- `output` path for output file

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

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

Every ~1 days

Total

9

Last Release

946d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5a567ab6543907b25a449bcf9b6649a7a65ac3cf62969e1dd1313071c3ae8117?d=identicon)[jaffe](/maintainers/jaffe)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/markuspaks-xades-tools/health.svg)

```
[![Health](https://phpackages.com/badges/markuspaks-xades-tools/health.svg)](https://phpackages.com/packages/markuspaks-xades-tools)
```

###  Alternatives

[defuse/php-encryption

Secure PHP Encryption Library

3.9k162.4M212](/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.7M112](/packages/mews-purifier)[robrichards/xmlseclibs

A PHP library for XML Security

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

Realistic password strength estimation PHP library based on Zxcvbn JS

86917.5M63](/packages/bjeavons-zxcvbn-php)[illuminate/encryption

The Illuminate Encryption package.

9229.7M277](/packages/illuminate-encryption)

PHPackages © 2026

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