PHPackages                             ferdhika31/php-crispy - 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. ferdhika31/php-crispy

ActiveLibrary[Security](/categories/security)

ferdhika31/php-crispy
=====================

A custom Crypto utility PHP library that ports and wraps cryptography concepts from the go-crypsi module to make life easier when working with Digest, Cipher, HMAC, RSA, and RSA Digital Signatures natively in PHP.

0.0.1(1mo ago)046↓66.7%MITPHPPHP ^8.1

Since Apr 16Pushed 1mo agoCompare

[ Source](https://github.com/ferdhika31/php-crispy)[ Packagist](https://packagist.org/packages/ferdhika31/php-crispy)[ RSS](/packages/ferdhika31-php-crispy/feed)WikiDiscussions main Synced 1w ago

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

php-crispy
==========

[](#php-crispy)

A custom Crypto utility PHP library that ports and wraps cryptography concepts from the [go-crypsi](https://github.com/telkomdev/go-crypsi) module to make life easier when working with Digest, Cipher, HMAC, RSA, and RSA Digital Signatures natively in PHP.

Requirements
------------

[](#requirements)

- PHP 8.1 or higher
- `ext-openssl`
- `ext-hash`

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require ferdhika31/php-crispy
```

*(Note: During development, you can simply clone this repository and run `composer install`)*

Features
--------

[](#features)

The library is split into 4 core cryptography modules under the `Ferdhika31\PhpCrispy` namespace:

### 1. Aesx (Symmetric Encryption)

[](#1-aesx-symmetric-encryption)

Provides AES encryption and decryption functions mapping to **CBC**, **CFB**, and **GCM** modes. It implicitly determines your AES key size (128, 192, or 256 bits).

```
use Ferdhika31\PhpCrispy\Aesx;

$key = "1234567890123456"; // 16 bytes = AES-128
$encrypted = Aesx::encryptCBC($key, "My Secret Data");
$decrypted = Aesx::decryptCBC($key, $encrypted);
```

### 2. Digestx (Hashing)

[](#2-digestx-hashing)

Provides easy-to-use variadic functions for standard checksums. Supports MD5, SHA1, SHA256, SHA384, and SHA512.

```
use Ferdhika31\PhpCrispy\Digestx;

$hex = Digestx::sha256Hex("hello", " ", "world");
```

### 3. Hmacx (Hash-based Message Authentication Code)

[](#3-hmacx-hash-based-message-authentication-code)

Provides HMAC signing capabilities guaranteeing data integrity, enforcing a minimum key length of 32 bytes for security.

```
use Ferdhika31\PhpCrispy\Hmacx;

$key = "super_secret_key_that_is_long_enough..";
$hmac = Hmacx::md5Hex($key, "My payload");
```

### 4. Rsax (Asymmetric Encryption &amp; Signatures)

[](#4-rsax-asymmetric-encryption--signatures)

Provides RSA Key Generation, Public-Key Cryptography Standard (PKCS) Encryption via OAEP, and RSA Digital Signatures.

```
use Ferdhika31\PhpCrispy\Rsax;

// Generate pairs
$keys = Rsax::generateKeyPairs(2048);

// Sign Data
$signature = Rsax::signSha256($keys['private'], "Important Payload");

// Verify Data
$isValid = Rsax::verifySignSha256($keys['public'], "Important Payload", $signature);
```

Examples
--------

[](#examples)

To see full working examples for each algorithm, check the `examples/` directory. Run them via terminal:

```
php examples/aes_sample.php
php examples/digest_sample.php
php examples/hmac_sample.php
php examples/rsa_sample.php
```

Testing
-------

[](#testing)

The library uses PHPUnit for robust testing. You can run the test suite by executing:

```
vendor/bin/phpunit tests
```

License
-------

[](#license)

The MIT License (MIT). Please see License File for more information.

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance89

Actively maintained with recent releases

Popularity10

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity32

Early-stage or recently created project

 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

55d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8111407?v=4)[Ferdhika Yudira](/maintainers/ferdhika31)[@ferdhika31](https://github.com/ferdhika31)

---

Top Contributors

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

---

Tags

php8

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ferdhika31-php-crispy/health.svg)

```
[![Health](https://phpackages.com/badges/ferdhika31-php-crispy/health.svg)](https://phpackages.com/packages/ferdhika31-php-crispy)
```

###  Alternatives

[mews/purifier

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

2.0k18.0M133](/packages/mews-purifier)[paragonie/ecc

PHP Elliptic Curve Cryptography library

24772.0k35](/packages/paragonie-ecc)[fof/recaptcha

Increase your forum's security with Google reCAPTCHA

1436.9k](/packages/fof-recaptcha)[enupal/backup

Fully integrated Backup solution for Craft CMS

1612.5k1](/packages/enupal-backup)[thomaswelton/laravel-mcrypt-faker

Allows installation of Laravel where the PHP Mcrypt extension is not available. Provides encryption using OpenSSL, or by disabling encryption entierly.

114.0k](/packages/thomaswelton-laravel-mcrypt-faker)

PHPackages © 2026

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