PHPackages                             kumatch/casule - 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. kumatch/casule

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

kumatch/casule
==============

Creates token and challenge by some attributes.

0.1.0(13y ago)122MITPHPPHP &gt;=5.3.3

Since Jun 27Pushed 13y agoCompare

[ Source](https://github.com/kumatch/php-casule)[ Packagist](https://packagist.org/packages/kumatch/casule)[ Docs](https://github.com/kumatch/php-casule)[ RSS](/packages/kumatch-casule/feed)WikiDiscussions master Synced 4w ago

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

Casule
======

[](#casule)

Creates token and challenge by some attributes.

Install
-------

[](#install)

Add "kumatch/casule" as a dependency in your project's composer.json file.

```
{
  "require": {
    "kumatch/casule": "*"
  }
}

```

And install your dependencies.

```
$ composer install

```

Usage
-----

[](#usage)

```
use Kumatch\Casule\Casule;

$attributes = array("foo" => 123, "bar" => "baz");
$salt = 'saltstring';

$casule = new Casule($salt);
$token = $casule->create($attributes);   // 'yBJwijCcdwrT0hXbeSIYvcWgP7U='

$algo = 'sha512';
$casule2 = new Casule($salt, $algo);
$token2 = $casule2->create($attributes);  // 'MoxMmk+ACDlHH/PaRQhgCZHjtrolbOpb5GvpbYHzPMZKwDXelj5x3BfyEMkCsXaPwVx59tlHPTqo1E305NkTDA=='

if ( $casule->challenge($token, $attributes) ) {
   echo 'valid token.';
}
```

License
-------

[](#license)

Licensed under the MIT License.

Copyright (c) 2013 Yosuke Kumakura

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

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

4752d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/47afd1b8d692632cd02d8630a36844daaf9dc77befe5278c7e8452bf52f32921?d=identicon)[kumatch](/maintainers/kumatch)

---

Tags

tokenhash

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/kumatch-casule/health.svg)

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

###  Alternatives

[hashids/hashids

Generate short, unique, non-sequential ids (like YouTube and Bitly) from numbers

5.4k50.9M304](/packages/hashids-hashids)[torann/hashids

Laravel package for Hashids

54341.1k](/packages/torann-hashids)[atelierdisko/coupon_code

PHP library to generate and validate coupon code strings.

60195.8k2](/packages/atelierdisko-coupon-code)[dirape/token

Unique Token Generator For Laravel

28283.1k2](/packages/dirape-token)[grazulex/laravel-sharelink

Generate, manage, and secure temporary share links for files, routes, and model previews.

1261.1k](/packages/grazulex-laravel-sharelink)[delight-im/ids

Short, obfuscated and efficient IDs for PHP

279.9k1](/packages/delight-im-ids)

PHPackages © 2026

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