PHPackages                             blackcube/lockbot - 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. blackcube/lockbot

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

blackcube/lockbot
=================

PHP version of Lockbot Captcha

1.1.0(8mo ago)02BSD-3-ClausePHPPHP ~8.3.0

Since Aug 28Pushed 8mo agoCompare

[ Source](https://github.com/blackcubeio/lockbot)[ Packagist](https://packagist.org/packages/blackcube/lockbot)[ RSS](/packages/blackcube-lockbot/feed)WikiDiscussions master Synced 1mo ago

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

Lockbot
=======

[](#lockbot)

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

[](#installation)

If you use Packagist for installing packages, then you can update your composer.json like this :

```
{
    "require": {
        "blackcube/lockbot": "*"
    }
}
```

Testing
-------

[](#testing)

To run the tests:

```
composer install
./vendor/bin/codecept build
./vendor/bin/codecept run
```

To check coverage report:

```
./vendor/bin/codecept run --coverage --coverage-html
```

Usage
-----

[](#usage)

Captcha class allows you to generate and verify POW CAPTCHA codes.

Generating CAPTCHA Codes

```
use blackcube\lockbot\Captcha;

$captcha = new Captcha();
$challenge = $captcha->generateChallenge(); // Generate a CAPTCHA challenge
// $challenge is an array with 'algorithm' and 'salt' and 'hash' keys
// ['algorithm' => 'sha256', 'salt' => 'random_salt', 'hash' => 'computed_hash']
```

Verifying CAPTCHA Codes

```
// $solution is the solution provided by the user ['salt' => 'challenge_salt', 'hash' => 'challenge_hash', 'algorithm' => 'challenge_algorithm', 'solution' => 'user_solution']
use blackcube\lockbot\Captcha;
$captcha = new Captcha(
    algorithm: $solution['algorithm'] // Use the same algorithm as the challenge);
);
$isValid = $captcha->verifySolution($solution['salt'], $solution['hash'], $solution['solution']); // Verify the provided solution
```

Main methods are:

- Generate a CAPTCHA challenge
- `generateChallenge(): array`
- Verify a provided solution
- `verifySolution(string $salt, string $hash, string $solution): bool`

Contributing
------------

[](#contributing)

All code contributions - including those of people having commit access - must go through a pull request and approved by a core developer before being merged. This is to ensure proper review of all the code.

Fork the project, create a [feature branch ](http://nvie.com/posts/a-successful-git-branching-model/), and send us a pull request.

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance61

Regular maintenance activity

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity53

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

Total

2

Last Release

243d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/545714?v=4)[pgaultier](/maintainers/pgaultier)[@pgaultier](https://github.com/pgaultier)

---

Top Contributors

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

---

Tags

captchaproof-of-workpowlockbot

###  Code Quality

TestsCodeception

### Embed Badge

![Health badge](/badges/blackcube-lockbot/health.svg)

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

###  Alternatives

[bonecms/laravel-captcha

Captcha integration for Laravel

76138.4k](/packages/bonecms-laravel-captcha)[pixelopen/cloudflare-turnstile-bundle

A simple package to help integrate Cloudflare Turnstile on Symfony.

31205.8k3](/packages/pixelopen-cloudflare-turnstile-bundle)[webman/captcha

Captcha generator

1484.2k25](/packages/webman-captcha)[isszz/rotate-captcha

Rotate image captcha

801.7k](/packages/isszz-rotate-captcha)[haruncpi/laravel-simple-captcha

A laravel simple captcha package

1128.3k](/packages/haruncpi-laravel-simple-captcha)[lubosdz/yii2-captcha-extended

Extended captcha code generator for Yii2 framework with configurable obfuscation level

1117.4k](/packages/lubosdz-yii2-captcha-extended)

PHPackages © 2026

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