PHPackages                             atwx/silverstripe-altcha-spamprotection - 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. atwx/silverstripe-altcha-spamprotection

ActiveSilverstripe-vendormodule[Utility &amp; Helpers](/categories/utility)

atwx/silverstripe-altcha-spamprotection
=======================================

Silverstripe Spamprotection module using Altcha

v0.2.2(2mo ago)163BSD-3-ClausePHPPHP ^8.2CI failing

Since Oct 30Pushed 2mo agoCompare

[ Source](https://github.com/atwx/silverstripe-altcha-spamprotection)[ Packagist](https://packagist.org/packages/atwx/silverstripe-altcha-spamprotection)[ RSS](/packages/atwx-silverstripe-altcha-spamprotection/feed)WikiDiscussions main Synced yesterday

READMEChangelog (4)Dependencies (16)Versions (7)Used By (0)

SilverStripe Altcha Spam Protection
===================================

[](#silverstripe-altcha-spam-protection)

This is a SilverStripe module that integrates the Altcha library with userforms to provide simple server-side CAPTCHA-like challenges for form spam protection.

Overview
--------

[](#overview)

The package provides an `AltchaField` that can be added to SilverStripe forms. It creates challenges via the altcha-org/altcha library and validates solutions on the server side.

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

[](#requirements)

- PHP 8.2+
- SilverStripe 6

The package depends on `altcha-org/altcha` (see `composer.json`).

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

[](#installation)

Install the package using Composer from the root of your SilverStripe project:

```
composer require atwx/silverstripe-altcha-spamprotection
```

If necessary, run your project's dev/build step (for example `vendor/bin/sake dev/build`) or your usual deployment steps to ensure any configuration is picked up.

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

[](#configuration)

Minimal `altcha.yml`:

```
SilverStripe\SpamProtection\Extension\FormSpamProtectionExtension:
  default_spam_protector: Atwx\SilverstripeAltchaSpamprotection\Protectors\AltchaSpamProtector
Atwx\SilverstripeAltchaSpamprotection\Forms\AltchaField:
  hmac_key: 'your-very-secret-hmac-key'
```

`AltchaField` exposes the following configuration options via SilverStripe Config (`_config/*.yml` or programmatically):

- `AltchaField.hmac_key` (string) — HMAC key for Altcha. This is required; the constructor throws if it is not set.
- `AltchaField.algorithm` (string) — Hash algorithm to use (`SHA-1`, `SHA-256`, `SHA-512`). Default: `SHA-256`.
- `AltchaField.default_max_number` (int) — Default maximum number for the challenge RNG (default: `1000000`).
- `AltchaField.default_salt_length` (int) — Default salt length for generated challenges (default: `12`).
- `AltchaField.expires_interval` (string) — ISO 8601 duration for challenge expiry (e.g. `PT20S` for 20 seconds). Default: `PT20S`.
- `AltchaField.challenge_endpoint` (string) — Endpoint to fetch challenge options from. Default: `/_altchaspamprotection/challengeoptions`.
- `AltchaField.debug` (bool|null) — Debug flag; if `null` the field uses `Director::isDev()`.

Note: Set `hmac_key` to a secure secret. This key is necessary for Altcha to generate and verify server signatures.

You can generate a new key with:

`php -r "echo bin2hex(random_bytes(64));"`

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance85

Actively maintained with recent releases

Popularity12

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 64.7% 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 ~57 days

Total

4

Last Release

75d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/64d979993815fa2d2ea95b3fd72b4f43e95a631ce569f4f1c0330786971b5fc2?d=identicon)[adiwidjaja](/maintainers/adiwidjaja)

![](https://avatars.githubusercontent.com/u/7694808?v=4)[Jan Metzger](/maintainers/Zazama)[@Zazama](https://github.com/Zazama)

---

Top Contributors

[![Zazama](https://avatars.githubusercontent.com/u/7694808?v=4)](https://github.com/Zazama "Zazama (11 commits)")[![adiwidjaja](https://avatars.githubusercontent.com/u/280394?v=4)](https://github.com/adiwidjaja "adiwidjaja (6 commits)")

---

Tags

silverstripespamcmsuserformsprotectionspamprotectionALTCHA

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/atwx-silverstripe-altcha-spamprotection/health.svg)

```
[![Health](https://phpackages.com/badges/atwx-silverstripe-altcha-spamprotection/health.svg)](https://phpackages.com/packages/atwx-silverstripe-altcha-spamprotection)
```

###  Alternatives

[silverstripe/userforms

UserForms enables CMS users to create dynamic forms via a drag and drop interface and without getting involved in any PHP code

1371.1M85](/packages/silverstripe-userforms)[axllent/silverstripe-email-obfuscator

Email obfuscator for SilverStripe

10109.1k5](/packages/axllent-silverstripe-email-obfuscator)[sunnysideup/typography

Add a typography test page to your silverstripe website / application.

124.4k4](/packages/sunnysideup-typography)

PHPackages © 2026

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