PHPackages                             saymontavares/open-pfx - 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. saymontavares/open-pfx

ActiveLibrary

saymontavares/open-pfx
======================

Extrai as chaves privadas do arquivo PFX

042PHP

Since Feb 17Pushed 4y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

open-pfx
========

[](#open-pfx)

[![License: GPL 3.0](https://camo.githubusercontent.com/e94ce9f4fd39b27192bb029140c06d8f944a0d5e0316532e603750a4c493e058/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d47504c2d7265642e737667)](https://opensource.org/licenses/GPL-3.0)[![Latest Stable Version](https://camo.githubusercontent.com/d0d4caf1cf09dc1344a701115dd083e796c4add33cd476241c6bead12e1c78ee/687474703a2f2f706f7365722e707567782e6f72672f7361796d6f6e746176617265732f6f70656e2d7066782f76)](https://packagist.org/packages/saymontavares/open-pfx) [![Total Downloads](https://camo.githubusercontent.com/fa59bef10a67dc96079cb586922fc78028a39b9a1739a4a7740064b8cc088575/687474703a2f2f706f7365722e707567782e6f72672f7361796d6f6e746176617265732f6f70656e2d7066782f646f776e6c6f616473)](https://packagist.org/packages/saymontavares/open-pfx) [![Latest Unstable Version](https://camo.githubusercontent.com/b1f64cfaf6a14dec95f28055e4a0ae5bbc405f9cc85e26d76462d38cb9faa463/687474703a2f2f706f7365722e707567782e6f72672f7361796d6f6e746176617265732f6f70656e2d7066782f762f756e737461626c65)](https://packagist.org/packages/saymontavares/open-pfx) [![License](https://camo.githubusercontent.com/b4315d00b19417057ed7c5f063f804584869b5fa736165c5bc32bf3186702746/687474703a2f2f706f7365722e707567782e6f72672f7361796d6f6e746176617265732f6f70656e2d7066782f6c6963656e7365)](https://packagist.org/packages/saymontavares/open-pfx) [![PHP Version Require](https://camo.githubusercontent.com/de560a111ac2895f6f0833260bd8664bac8552d3a401a4504c2c58663ebb0b51/687474703a2f2f706f7365722e707567782e6f72672f7361796d6f6e746176617265732f6f70656e2d7066782f726571756972652f706870)](https://packagist.org/packages/saymontavares/open-pfx)

Classe para gerar os arquivos privados à partir do arquivo PFX criptografado com senha.

### Table of Contents

[](#table-of-contents)

- [Visão geral](#vis%C3%A3o-geral)
- [Built](#built-with)
- [Como usar](#como-usar)
- [Contact](#contact)

### Visão geral

[](#visão-geral)

Informando o arquivo PFX com a senha, a classe fica reponsável por gerar o arquivo .cer e/ou .pem, é possível definir o diretório e o nome dos arquivos que serão salvos.

### Built With

[](#built-with)

- [PHP 7+](https://www.php.net/)

### Como usar

[](#como-usar)

Instale o pacote no seu projeto e siga o exemplo:

```
$ composer install saymontavares/open-pfx
```

```
require_once 'vendor/autoload.php';

use Saymontavares\OpenPfx\Pfx;

$cert = 'CERTIFICADO.pfx';
$cert_password = 'SENHA';

try {
    $open = new Pfx($cert, $cert_password);
    // chaves privadas
    $keys = $open->read();
    echo "";
    print_r ($keys);
    echo "";

    // certificado .cer será salvo no diretório 'certs/' com o nome 'certificado-cer.cer'
    if ($open->toCer('certs/', 'certificado-cer') !== false) echo "arquivo .CER gerado";

    // certificado .pem será salvo na raiz
    if ($open->toPem() !== false) echo "arquivo .PEM gerado";
} catch (Exception $e) {
    echo 'Exceção capturada: ',  $e->getMessage(), "\n";
}
```

Contact
-------

[](#contact)

- GitHub [@saymontavares](https://github.com/saymontavares)

Thank You! developed by **Saymon Tavares**.

###  Health Score

16

—

LowBetter than 5% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity27

Early-stage or recently created project

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/7ff9fc05244a5574164f4670a7cc582cc1ffa1e1dfa90e1845d79ebcfb273418?d=identicon)[saymonweb](/maintainers/saymonweb)

### Embed Badge

![Health badge](/badges/saymontavares-open-pfx/health.svg)

```
[![Health](https://phpackages.com/badges/saymontavares-open-pfx/health.svg)](https://phpackages.com/packages/saymontavares-open-pfx)
```

PHPackages © 2026

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