PHPackages                             wtframework/security - 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. wtframework/security

ActiveLibrary[Security](/categories/security)

wtframework/security
====================

What the Framework?! security

v0.1.0(2y ago)112proprietaryPHPPHP ^8.2

Since Dec 28Pushed 1y ago1 watchersCompare

[ Source](https://github.com/wtframework/security)[ Packagist](https://packagist.org/packages/wtframework/security)[ RSS](/packages/wtframework-security/feed)WikiDiscussions main Synced yesterday

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

What the Framework?! security
=============================

[](#what-the-framework-security)

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

[](#installation)

```
composer require wtframework/security
```

Documentation
-------------

[](#documentation)

### Configuration

[](#configuration)

Use the [Config](https://github.com/wtframework/config) library to set the security configuration settings.

```
use WTFramework\Config\Config;

Config::set([
  'security' => [
    'encryption_key' => 'ec5964323dc239ab63417a0f98ff1eef', // openssl rand -hex 16
    'hash_salt' => 'f93101e3a5f4f09f8c1a9ac0f9301c6e', // openssl rand -hex 16
    'password_pepper' => '2429fc585eef890c13e2c5307dcb02f23d8d83ea86740d864a6e79e2a7613cd1a95efd42', // openssl rand -hex 36
  ],
]);
```

Settings:

`security`
The root security setting.

`security.password_pepper`
The application wide salt to append to every password.

`security.password_algorithm`
The `password_hash` algorithm. The default is `PASSWORD_DEFAULT`.

`security.password_options`
The `password_hash` options. The default is `['cost' => 12]`.

`security.encryption_key`
The `openssl_encrypt` passphrase.

`security.encryption_algorithm`
The `openssl_encrypt` cipher method. The default is `aes-128-gcm`.

`security.encryption_options`
The `openssl_encrypt` options. The default is `0`.

`security.hash_salt`
The `hash_pbkdf2` salt.

`security.hash_algorithm`
The `hash_pbkdf2` hashing algorithm. The default is `sha3-512`.

`security.hash_iterations`
The `hash_pbkdf2` iterations. The default is `10000`.

### WTFramework\\Security\\Password

[](#wtframeworksecuritypassword)

Hash a password:

```
use WTFramework\Security\Password;

$hash = Password::hash('password');
```

Verify a hashed password:

```
if (Password::verify('password', $hash))
{
  // ...
}
```

Check to see if the password needs to be rehashed:

```
if (Password::needsRehash($hash))
{
  // ...
}
```

### WTFramework\\Security\\Crypt

[](#wtframeworksecuritycrypt)

Encrypt text:

```
use WTFramework\Security\Crypt;

$encrypted = Crypt::encrypt('text');
```

Decrypt text:

```
$text = Crypt::decrypt($encrypted);
```

Hash text:

```
$hashed = Crypt::hash('text');
```

Generate a version 4 UUID:

```
$uuid = Crypt::uuid();
```

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance27

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

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

Unknown

Total

1

Last Release

918d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/120370615?v=4)[What the Framework?!](/maintainers/wtframework)[@wtframework](https://github.com/wtframework)

---

Top Contributors

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

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/wtframework-security/health.svg)

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

###  Alternatives

[mews/purifier

Laravel 5/6/7/8/9/10 HtmlPurifier Package

2.0k18.7M143](/packages/mews-purifier)[paragonie/ecc

PHP Elliptic Curve Cryptography library

24820.0k37](/packages/paragonie-ecc)

PHPackages © 2026

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