PHPackages                             azzmin/cakephp-altcha - 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. azzmin/cakephp-altcha

ActiveCakephp-plugin[Security](/categories/security)

azzmin/cakephp-altcha
=====================

Altcha proof-of-work spam protection for CakePHP 5

v1.0.2(2mo ago)02Apache-2.0PHPPHP &gt;=8.1

Since Apr 26Pushed 2mo agoCompare

[ Source](https://github.com/azzmin/cakephp-altcha)[ Packagist](https://packagist.org/packages/azzmin/cakephp-altcha)[ RSS](/packages/azzmin-cakephp-altcha/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (3)Dependencies (2)Versions (4)Used By (0)

cakephp-altcha
==============

[](#cakephp-altcha)

Altcha proof-of-work spam protection for CakePHP 5. Privacy-friendly, no external services, no tracking.

Uses [Altcha](https://altcha.org/) to generate SHA-256 challenges that are solved client-side. No CAPTCHA images, no Google dependencies.

Install
-------

[](#install)

```
composer require azzmin/cakephp-altcha
```

Setup
-----

[](#setup)

**1. Load the plugin** in `src/Application.php`:

```
$this->addPlugin('Altcha');
```

**2. In your controller** load the component and helper:

```
public function initialize(): void
{
    parent::initialize();
    $this->loadComponent('Altcha.Altcha');
    $this->viewBuilder()->addHelper('Altcha.Altcha');
}
```

**3. Verify on POST** in your action, before processing the form:

```
if ($this->request->is('post')) {
    if (!$this->Altcha->verify($this->request)) {
        $this->Flash->error('Please complete the verification.');
        return null;
    }

    // process form...
}
```

**4. Render the widget** in your template, before the submit button:

```

```

That's it. No database, no routes, no configuration required.

Options
-------

[](#options)

Pass an array to `widget()` to customise:

```

```

OptionTypeDescription`hidelogo``true`Hide the Altcha logo`hidelabel``true`Hide the "I'm not a robot" label`name``string`Hidden input name (default: `altcha`)`auto``string`Auto-solve mode: `onfocus`, `onload`, `onsubmit`If you change `name`, pass the same value to verify:

```
$this->Altcha->verify($this->request, 'my_field_name');
```

Configuration
-------------

[](#configuration)

All optional. Defaults work out of the box using `Security.salt` from `app_local.php`.

Add to `config/app_local.php` to override:

```
'Altcha' => [
    'hmacKey' => 'your-custom-key',    // defaults to Security.salt
    'maxNumber' => 100000,              // higher = harder for bots
    'saltLength' => 12,
    'jsUrl' => 'https://cdn.jsdelivr.net/npm/altcha@latest/dist/altcha.js',
],
```

How it works
------------

[](#how-it-works)

1. Server generates a SHA-256 challenge with a HMAC signature
2. Client solves the proof-of-work in the browser (finds the nonce)
3. Solution is submitted as a hidden form field
4. Server verifies the hash and HMAC signature

No data sent to third parties. All computation happens in the browser.

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

[](#requirements)

- PHP 8.1+
- CakePHP 5.0+

License
-------

[](#license)

Apache-2.0

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance82

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity45

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

Every ~0 days

Total

3

Last Release

89d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/597475305af4e82cad7f0019044b6d7c6f28f96a0f8028add8c0e50c7f380cda?d=identicon)[azzmin](/maintainers/azzmin)

---

Top Contributors

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

---

Tags

cakephpspamcaptchaantispamALTCHAcakephp5

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/azzmin-cakephp-altcha/health.svg)

```
[![Health](https://phpackages.com/badges/azzmin-cakephp-altcha/health.svg)](https://phpackages.com/packages/azzmin-cakephp-altcha)
```

###  Alternatives

[gregwar/captcha

Captcha generator

1.9k10.1M159](/packages/gregwar-captcha)[gregwar/captcha-bundle

Captcha bundle

3684.9M34](/packages/gregwar-captcha-bundle)[cakephp/bake

Bake plugin for CakePHP

11212.0M207](/packages/cakephp-bake)[dereuromark/cakephp-queue

The Queue plugin for CakePHP provides deferred task execution.

308954.9k25](/packages/dereuromark-cakephp-queue)[dereuromark/cakephp-ide-helper

CakePHP IdeHelper Plugin to improve auto-completion

1882.3M45](/packages/dereuromark-cakephp-ide-helper)[dereuromark/cakephp-tinyauth

A CakePHP plugin to handle user authentication and authorization the easy way.

131240.2k13](/packages/dereuromark-cakephp-tinyauth)

PHPackages © 2026

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