PHPackages                             royalcms/hashids - 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. royalcms/hashids

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

royalcms/hashids
================

Royalcms package for Hashids

v5.0.0(6y ago)04MITPHPPHP &gt;=5.4.0

Since Sep 4Pushed 6y ago1 watchersCompare

[ Source](https://github.com/royalcms/royalcms-hashids)[ Packagist](https://packagist.org/packages/royalcms/hashids)[ Docs](http://royalcms.cn)[ RSS](/packages/royalcms-hashids/feed)WikiDiscussions master Synced 3d ago

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

Hashids
=======

[](#hashids)

A hashids wrapper for Royalcms Component.

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

[](#installation)

#### Facade

[](#facade)

To add facade support for Royalcms, add the following line inside your `config/facade.php` under the alias section...

```
'RC_Hashids' => 'Royalcms\Component\Hashids\Facades\Hashids',
```

then add the following to your `.env` file:

```
# HASHIDS

HASHIDS_SALT = YOURSECRETKEY
HASHIDS_LENGTH = 8
HASHIDS_ALPHABET = abcedfghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPAQRSTUVWXYZ1234567890
```

Settings
--------

[](#settings)

namedescriptiondefaultsaltThe secret used for hashing.MYREALLYSECRETSALTlengthThe maximum length of the hash.10alphabetThe characters used for hashing.abcedefghijklmnopqrstuvwxyzABCEDEFGHIJKLMNOPQRSTUVWXYZ123456890Usage
-----

[](#usage)

### Encode

[](#encode)

Encode a series of integers

```
royalcms('hashids')->encode(...$integers);
```

or with the facade

```
RC_Hashids::encode(...$integers);
```

### Decode

[](#decode)

Decode a encoded string back to the original integers

```
royalcms('hashids')->decode($encoded);
```

or with the facade

```
RC_Hashids::decode($encoded);
```

License
-------

[](#license)

This library is licensed under [MIT](http://choosealicense.org/licenses/mit), see [license.md](license.md) for details.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

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

Unknown

Total

1

Last Release

2445d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1106638?v=4)[Hao.Dongfang](/maintainers/royalwang)[@royalwang](https://github.com/royalwang)

---

Top Contributors

[![royalwang](https://avatars.githubusercontent.com/u/1106638?v=4)](https://github.com/royalwang "royalwang (1 commits)")

---

Tags

hashencodedecodehashidroyalcms

### Embed Badge

![Health badge](/badges/royalcms-hashids/health.svg)

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

###  Alternatives

[hashids/hashids

Generate short, unique, non-sequential ids (like YouTube and Bitly) from numbers

5.5k48.6M278](/packages/hashids-hashids)[torann/hashids

Laravel package for Hashids

54335.1k](/packages/torann-hashids)[christian-riesen/base32

Base32 encoder/decoder according to RFC 4648

13331.8M61](/packages/christian-riesen-base32)[sqids/sqids

Generate short YouTube-looking IDs from numbers

5781.4M33](/packages/sqids-sqids)[elfsundae/laravel-hashid

A simple, elegant way to obfuscate your data by generating reversible, non-sequential, URL-safe identifiers.

415246.3k2](/packages/elfsundae-laravel-hashid)[delight-im/ids

Short, obfuscated and efficient IDs for PHP

289.5k1](/packages/delight-im-ids)

PHPackages © 2026

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