PHPackages                             arthurkushman/coossions - 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. [File &amp; Storage](/categories/file-storage)
4. /
5. arthurkushman/coossions

ActiveLibrary[File &amp; Storage](/categories/file-storage)

arthurkushman/coossions
=======================

Coossions php plugin to store sessions in encrypted cookie

1.1.1(9y ago)5301PHPPHP &gt;=7.0

Since Apr 8Pushed 7y ago1 watchersCompare

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

READMEChangelog (4)Dependencies (1)Versions (6)Used By (0)

coossions
=========

[](#coossions)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/b119ae25ef76c65af5cb413edbe0e46e699649fbe054097425afd44cf21faabc/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6172746875726b7573686d616e2f636f6f7373696f6e732f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/arthurkushman/coossions/?branch=master)[![Build Status](https://camo.githubusercontent.com/87c937a5a39c800c188b051dbd05e6bbd9cd6da2782880be00fff5e3acb5fc63/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6172746875726b7573686d616e2f636f6f7373696f6e732f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/arthurkushman/coossions/build-status/master)[![Code Coverage](https://camo.githubusercontent.com/8d6c915688521b57763c3d518ee3f68d9b0f1445294c091543b0c8db646352d8/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6172746875726b7573686d616e2f636f6f7373696f6e732f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/arthurkushman/coossions/?branch=master)[![MIT Licence](https://camo.githubusercontent.com/fabb40ab22588a0746bb0916ed92739171bde7fb31f281c627aa588bcba62cc2/68747470733a2f2f6261646765732e66726170736f66742e636f6d2f6f732f6d69742f6d69742e7376673f763d313033)](https://opensource.org/licenses/mit-license.php)

Coossions (stands for cookie-sessions) is a php plugin to store sessions in encrypted cookie

Installation via composer
-------------------------

[](#installation-via-composer)

```
    composer require arthurkushman/coossions
```

Usage
-----

[](#usage)

```
    $coossions = new CoossionsHandler('your_digest_secrete'); // any secret word
    $coossions->startSession();
```

And then, as usual, in any code-space - set session global variables:

```
    $_SESSION['foo'] = 123;
    $_SESSION['bar'] = 'baz';
```

Get session global variables:

```
    echo $_SESSION['foo'] . ' ' . $_SESSION['bar'];
```

Details
-------

[](#details)

Session will be written in cookie on client-side with openssl cipher code (in aes-256-ctr cipher algorithm by default) and digested with `your_digest_secrete` (in sha256 by default). Also, whole message will be merged with hash\_hmac, based on salt consisting of dynamic SID + message, which will then checked by hash\_equals to additionally identify non-fraudulent data stored in cookie.

To create reliable/secure cryptographic signature, it would be better if `your_digest_secrete` will be in both upper/lower case letters and mashed with digits + long enough.

Setting custom hash and cryptographic algorithms through DI
-----------------------------------------------------------

[](#setting-custom-hash-and-cryptographic-algorithms-through-di)

Although, there are already set the best known, at the moment, hash and crypto algos - You can set Your preferable ones:

```
        $coossions = new CoossionsHandler('your_digest_secrete');

        $encryptor = new Encryptor('your_digest_secrete');
        $encryptor->setDigestAlgo('sha512'); // defaults to sha256
        $encryptor->setCipherAlgo('aes-128-ctr'); // defaults to aes-256-ctr
        $coossions->setEncryption($encryptor);

        $coossions->startSession();
```

Performance
-----------

[](#performance)

Tested performance of write/read 2 $\_SESSION vars (3 symbols long int/string):

- write avg time 6-8 microseconds
- read avg time 5-7 microseconds

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity62

Established project with proven stability

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

Total

4

Last Release

3297d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1f7457ca41f3ffc690f41a6035fdeb4ab8eced3871a3061a638fd8dc80343588?d=identicon)[arthurkushman](/maintainers/arthurkushman)

---

Top Contributors

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

---

Tags

cookiedataphpphp7sessionstorage

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/arthurkushman-coossions/health.svg)

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

###  Alternatives

[knplabs/gaufrette

PHP library that provides a filesystem abstraction layer

2.5k39.8M123](/packages/knplabs-gaufrette)[google/cloud-storage

Cloud Storage Client for PHP

34390.8M125](/packages/google-cloud-storage)[illuminate/filesystem

The Illuminate Filesystem package.

15261.6M2.6k](/packages/illuminate-filesystem)[superbalist/flysystem-google-storage

Flysystem adapter for Google Cloud Storage

26320.6M30](/packages/superbalist-flysystem-google-storage)[creocoder/yii2-flysystem

The flysystem extension for the Yii framework

2931.7M62](/packages/creocoder-yii2-flysystem)[flowjs/flow-php-server

PHP library for handling chunk uploads. Works with flow.js html5 file uploads.

2451.6M15](/packages/flowjs-flow-php-server)

PHPackages © 2026

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