PHPackages                             rosio/encrypted-cookie - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. rosio/encrypted-cookie

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

rosio/encrypted-cookie
======================

Allows easy management of encrypted cookies

v1.0.0(12y ago)66.6k3[1 issues](https://github.com/Rosio/Encrypted-Cookies/issues)MITPHP

Since Feb 24Pushed 11y ago2 watchersCompare

[ Source](https://github.com/Rosio/Encrypted-Cookies)[ Packagist](https://packagist.org/packages/rosio/encrypted-cookie)[ RSS](/packages/rosio-encrypted-cookie/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (2)Versions (9)Used By (0)

Encrypted Cookie
================

[](#encrypted-cookie)

[![Build Status](https://camo.githubusercontent.com/7dcb495a87e5351cbe497473abb16dee38975ccc98bb102515cc69c520c9d2fd/68747470733a2f2f636972636c6563692e636f6d2f67682f526f73696f2f456e637279707465642d436f6f6b6965732e706e673f636972636c652d746f6b656e3d35313631643838646237613662653032356465363335313935643161376163366134333037383763)](https://camo.githubusercontent.com/7dcb495a87e5351cbe497473abb16dee38975ccc98bb102515cc69c520c9d2fd/68747470733a2f2f636972636c6563692e636f6d2f67682f526f73696f2f456e637279707465642d436f6f6b6965732e706e673f636972636c652d746f6b656e3d35313631643838646237613662653032356465363335313935643161376163366134333037383763)

Library provides basic functionality to easily create and manage encrypted cookies.

Based off of [RFC 6896 KoanLogic's Secure Cookie Sessions for HTTP](https://tools.ietf.org/html/rfc6896).

Testing
-------

[](#testing)

To run unit tests:

1. `composer install`
2. `vendor/bin/phpunit`

Quick Example
-------------

[](#quick-example)

```
use Rosio\EncryptedCookie\CookieStorage;
use Rosio\EncryptedCookie\Cookie;
use Rosio\EncryptedCookie\CryptoSystem\AES_SHA;

// Used to create cookies with a given cryptoSystem
$storage = new CookieStorage(new AES_SHA('32charactercryptokeymustbe32chrs', 'HMACKey'));

// Create a cookie
$data = 'blah';
$cookie = Cookie::create('testCookie', $data);
$storage->save($cookie);

// Load the cookie
$newCookie = $storage->load('testCookie'); // Returns a PartialCookie
echo $newCookie->getData();
```

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity68

Established project with proven stability

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

Total

7

Last Release

4455d ago

Major Versions

v0.1.5 → v1.0.02014-03-03

### Community

Maintainers

![](https://www.gravatar.com/avatar/733673099c75cb3d61b12b290783b59ecfa31d4ebcdf2ac62bbd5540b238138d?d=identicon)[ben-rosio](/maintainers/ben-rosio)

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/rosio-encrypted-cookie/health.svg)

```
[![Health](https://phpackages.com/badges/rosio-encrypted-cookie/health.svg)](https://phpackages.com/packages/rosio-encrypted-cookie)
```

PHPackages © 2026

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