PHPackages                             devtoolboxuk/hashing - 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. devtoolboxuk/hashing

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

devtoolboxuk/hashing
====================

Hashing Package

1.0.5(7y ago)0390MITPHP

Since Aug 11Pushed 7y ago1 watchersCompare

[ Source](https://github.com/devtoolboxuk/hashing)[ Packagist](https://packagist.org/packages/devtoolboxuk/hashing)[ RSS](/packages/devtoolboxuk-hashing/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (4)Dependencies (1)Versions (6)Used By (0)

hashing
=======

[](#hashing)

Hashing Service

[![Build Status](https://camo.githubusercontent.com/ece6facc9e143cbf10d72e377796c42d1b27a659ee1e9eb7abfb93f55f14aa12/68747470733a2f2f6170692e7472617669732d63692e6f72672f646576746f6f6c626f78756b2f68617368696e672e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/devtoolboxuk/hashing)[![Coveralls](https://camo.githubusercontent.com/9e2ccdf99ff5146471ecc58e865c0a7179b5e7788bb565ec19dc47cdf021556a/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f646576746f6f6c626f78756b2f68617368696e672f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/devtoolboxuk/hashing?branch=master)[![CodeCov](https://camo.githubusercontent.com/efcb34bd3dc2eae96424b9c65f1925cb2e119a60cad2f34786eb21109fac416d/68747470733a2f2f636f6465636f762e696f2f67682f646576746f6f6c626f78756b2f68617368696e672f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/devtoolboxuk/hashing)

Table of Contents
-----------------

[](#table-of-contents)

- [Background](#Background)
- [Usage](#Usage)
- [Maintainers](#Maintainers)
- [License](#License)

Background
----------

[](#background)

Although there are many hashing services out there, I decided to create a basic one for use on some of my projects.

The Unit Tests have been run on PHP 5.4 and 7.2. This is to help support legacy projects.

Usage
-----

[](#usage)

Usage of the hashing service

```
$ composer require devtoolboxuk/Hashing
```

Then include Composer's generated vendor/autoload.php to enable autoloading:

```
require 'vendor/autoload.php';
```

```
use devtoolboxuk/Hashing;

$this->hashingService = new HashingService();
```

##### Set Hashing Key

[](#set-hashing-key)

```
$this->hashingService->setHashingKey($key);
```

##### Get Hashing key

[](#get-hashing-key)

```
$this->hashingKey = $this->hashingService->getHashingKey();
```

##### Hashing Data

[](#hashing-data)

Pass in the data to be hashed.

```
$this->hashingService->hash("Test Data");
```

##### Get Hashed Data

[](#get-hashed-data)

Returns the hash of the data.

```
$this->hashingService->getHashedData()
```

By default, the Hashing service uses the SHA256 Algoritm, and the HMAC Hashing Function

##### Retrieve Hashed Data

[](#retrieve-hashed-data)

```
$this->hashingService->setHashingKey($key);
$this->hashingKey = $this->hashingService->getHashingKey();
```

The algorithm for hashing can be changed using this function, currently only the following algorithms are supported; 'sha256', 'sha384', 'sha512', 'md5'

##### Set Algorithm

[](#set-algorithm)

```
$this->hashingService->setHashingKey($key);
$this->hashingKey = $this->hashingService->getHashingKey();
```

The hashing function can also be changed to use either hmac or not (others may come along...)

##### Set Hashing Function

[](#set-hashing-function)

```
$this->hashingService->setHashFunction('hmac');
```

Maintainers
-----------

[](#maintainers)

[@DevToolboxUk](https://github.com/DevToolBoxUk).

License
-------

[](#license)

[MIT](LICENSE) © DevToolboxUK

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity66

Established project with proven stability

 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

5

Last Release

2833d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/11e7828108a460ad0b3dc92c08fa9e0e863168b8dae2b4d7041a6d699f936faa?d=identicon)[devtoolboxuk](/maintainers/devtoolboxuk)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/devtoolboxuk-hashing/health.svg)

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

PHPackages © 2026

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