PHPackages                             garsaud/cryptstreamaes - 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. garsaud/cryptstreamaes

ActiveLibrary[Security](/categories/security)

garsaud/cryptstreamaes
======================

Encrypt and decrypt php resources (streams) on-the-fly using AES 128, 192, 256

v1.0.0(3y ago)06MITPHPPHP &gt;=8.1

Since Feb 20Pushed 3y ago1 watchersCompare

[ Source](https://github.com/garsaud/CryptStreamAES)[ Packagist](https://packagist.org/packages/garsaud/cryptstreamaes)[ RSS](/packages/garsaud-cryptstreamaes/feed)WikiDiscussions main Synced 1mo ago

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

CryptStreamAES
==============

[](#cryptstreamaes)

[![GitHub CI](https://github.com/garsaud/CryptStreamAES/actions/workflows/php.yml/badge.svg)](https://github.com/garsaud/CryptStreamAES/actions)

This package encrypts and decrypts resources (streams) using AES 128, 192 or 256 using mcrypt.

It operates on resources (local or remote obtained via `fopen(…)`) in chunks, making it possible to process very large contents without exceeding the memory limit.

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

[](#installation)

```
composer require garsaud/cryptstreamaes
```

Usage
-----

[](#usage)

```
use Garsaud\CryptStreamAES\AES;
use Garsaud\CryptStreamAES\Length;

$aes = new AES(Length::AES256);

$aes->encrypt(
    key: 'B374A26A71490437AA024E4FADD5B497FDFF1A8EA6FF12F6FB65AF2720B59CCF',
    inputStream: fopen('myfile.jpg', 'rb'),
    outputStream: fopen('myfile-encrypted.bin', 'wb'),
);
```

```
use Garsaud\CryptStreamAES\AES;
use Garsaud\CryptStreamAES\Length;

$aes = new AES(Length::AES256);

$aes->decrypt(
    key: 'B374A26A71490437AA024E4FADD5B497FDFF1A8EA6FF12F6FB65AF2720B59CCF',
    inputStream: fopen('myfile-encrypted.bin', 'rb'),
    outputStream: fopen('myfile.jpg', 'wb'),
);
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

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

Unknown

Total

1

Last Release

1182d ago

### Community

Maintainers

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

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/garsaud-cryptstreamaes/health.svg)

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

###  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)
