PHPackages                             baha2rmirzazadeh/phpguard - 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. baha2rmirzazadeh/phpguard

Abandoned → [blackplatinum/encryption](/?search=blackplatinum%2Fencryption)ArchivedLibrary[Security](/categories/security)

baha2rmirzazadeh/phpguard
=========================

A security cryptography library for PHP. It can be used by different frameworks or pure PHP

v3.1.6(6y ago)29MITPHPPHP ^7.2.25

Since Oct 18Pushed 6y ago1 watchersCompare

[ Source](https://github.com/Baha2rM98/PHPGuard)[ Packagist](https://packagist.org/packages/baha2rmirzazadeh/phpguard)[ RSS](/packages/baha2rmirzazadeh-phpguard/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (9)Dependencies (2)Versions (11)Used By (0)

PHPGuard
========

[](#phpguard)

A security cryptography library for PHP. It can be used by different frameworks or pure PHP

PHPGuard Console App
--------------------

[](#phpguard-console-app)

A command line interface designed for this library due to set a encryption key, test system etc.

Some of commands:

- \[php guard set:key\]
- \[php guard fresh\] Installation

---

Use \[Composer\] to install the package:

```
$ composer require baha2rmirzazadeh/phpguard

```

Examples
--------

[](#examples)

```
use PHPGuard\Crypto\Crypto;
use PHPGuard\Crypto\Key;

$cr = new Crypto("CAST5-CBC");
$cr->setKey(Key::getKey());
$c = $cr->encrypt([
        "Name"      => "Baha2r",
        "LastName"  => "Mirzazadeh",
        "Age"       => 22,
        "IsStudent" => true,
        "Courses"   => ["Math", "Ecocnomy", "Chemistry"]
]);
print $c."\n";
print_r($cr->decrypt($c));

$cr = $cr->setCipher("AES-192-CBC");
$cr->setKey(Crypto::generateKey());
$c = $cr->encrypt([
        "Name"      => "Baha2r",
        "LastName"  => "Mirzazadeh",
        "Age"       => 22,
        "IsStudent" => true,
        "Courses"   => ["Math", "Ecocnomy", "Chemistry"]
]);
print $c."\n";
print_r($cr->decrypt($c));
print_r(Crypto::supported());
```

Author
------

[](#author)

- \[Bahador Mirzazadeh\]
- E-Mail: \[\]

License
-------

[](#license)

MIT

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

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 ~12 days

Recently: every ~20 days

Total

9

Last Release

2295d ago

Major Versions

v1.5.2 → v2.0.02019-11-05

v2.0.0 → v3.0.02019-11-14

PHP version history (3 changes)1.0.0PHP ^7.1

v3.1.0PHP ^7.2

v3.1.5PHP ^7.2.25

### Community

Maintainers

![](https://www.gravatar.com/avatar/d07b50b87fe3e0736d8fd5f904b0a7ef27c03e23edfee48c61e01729699301f0?d=identicon)[Baha2r](/maintainers/Baha2r)

---

Top Contributors

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

---

Tags

crypto-librarycryptographysecurityphpsecurityencryptionhashinghashcipherMACdecryption

### Embed Badge

![Health badge](/badges/baha2rmirzazadeh-phpguard/health.svg)

```
[![Health](https://phpackages.com/badges/baha2rmirzazadeh-phpguard/health.svg)](https://phpackages.com/packages/baha2rmirzazadeh-phpguard)
```

###  Alternatives

[yiisoft/security

Security utilities

43451.3k6](/packages/yiisoft-security)[poly-crypto/poly-crypto

High-level cryptographic functions that are interoperable between NodeJS and PHP 7.1+

127.8k1](/packages/poly-crypto-poly-crypto)[al-saloul/encryption

Simple number encryption and decryption package

191.1k](/packages/al-saloul-encryption)

PHPackages © 2026

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