Download the PHP package trilbymedia/cap-php without Composer
On this page you can find all versions of the php package trilbymedia/cap-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download trilbymedia/cap-php
More information about trilbymedia/cap-php
Files in trilbymedia/cap-php
Download trilbymedia/cap-php
More information about trilbymedia/cap-php
Files in trilbymedia/cap-php
Vendor trilbymedia
Package cap-php
Short Description PHP port of the Cap proof-of-work captcha server. Wire-compatible with @cap.js/widget.
License Apache-2.0
Homepage https://github.com/trilbymedia/cap-php
Package cap-php
Short Description PHP port of the Cap proof-of-work captcha server. Wire-compatible with @cap.js/widget.
License Apache-2.0
Homepage https://github.com/trilbymedia/cap-php
Please rate this library. Is it a good library?
Informations about the package cap-php
cap-php
PHP port of the Cap proof-of-work captcha server.
Wire-compatible with the official @cap.js/widget, so the unmodified JS widget can talk to a PHP-backed endpoint.
- SHA-256 proof-of-work — no tracking, no third-party calls, no API keys
- Small (~500 LOC), no runtime dependencies beyond ext-json / ext-hash
- Pluggable storage: in-memory, filesystem, or any PSR-16 cache
Install
Usage
Defaults
| Option | Default | Meaning |
|---|---|---|
| challengeCount | 50 | Number of sub-challenges per captcha |
| challengeSize | 32 | Salt length (hex chars) |
| challengeDifficulty | 4 | Target prefix length (hex chars) |
| expiresMs | 600 000 | Challenge TTL (10 min) |
| token TTL | 20 min | Validation token TTL (not configurable) |
Protocol compatibility
The PRNG and hashing are bit-exact with upstream server/index.js — verified by tests/fixtures/prng-vectors.json, a set of vectors generated directly from the upstream JS implementation.
License
Apache-2.0, matching upstream.
All versions of cap-php with dependencies
PHP Build Version
Package Version
Requires
php Version
^8.1
ext-json Version *
ext-hash Version *
ext-json Version *
ext-hash Version *
The package trilbymedia/cap-php contains the following files
Loading the files please wait ...