Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Hasher Laravel Package

arcanedev/hasher

Arcanedev/Hasher is a Laravel-friendly wrapper around Hashids for encoding IDs and integers into short, unique, non-sequential strings and decoding them back. It offers configurable salt, length, and alphabet, making it useful for obfuscating database IDs in URLs.

View on GitHub
Deep Wiki
Context7

:closed_lock_with_key: Provides a flexible hash manager for Laravel.

Frequently asked questions about Hasher
What does arcanedev/hasher do in Laravel?
Arcanedev Hasher is a Laravel-friendly wrapper around Hashids. It encodes IDs and integers into short, unique, non-sequential strings and decodes them back. It is commonly used to obfuscate database IDs in URLs instead of exposing raw sequential values.
How do I install arcanedev/hasher?
Install the package with Composer using the arcanedev/hasher package name. After that, follow the README for any Laravel service provider registration and configuration publishing steps that apply to your Laravel version. Confirm the PHP and Laravel constraints in the package's composer.json before installing.
Which Laravel versions does arcanedev/hasher support?
The package is described as Laravel-friendly, but the context provided does not list specific supported Laravel versions. Check the repository README and composer.json for the exact Laravel and PHP version constraints. That is the safest way to confirm compatibility before adding it to an existing application.
How do I configure the Hashids salt, length, and alphabet?
Yes, the package supports configurable salt, length, and alphabet values for Hashids. Set these in the package configuration so the generated strings match your desired length and character set. Keep the salt consistent anywhere you need to decode hashes back to IDs.
Can I decode a hash back to the original ID?
Yes, because Hasher is a wrapper around Hashids, it supports decoding a generated hash back into the original integer or ID. You must use the same salt, length, and alphabet settings that were used to encode the value. If those settings change, previously generated hashes may no longer decode as expected.
Is arcanedev/hasher suitable for hiding database IDs in URLs?
Yes, that is a common use case because Hashids produce short, non-sequential strings instead of exposing raw database IDs. They make URLs less predictable and less enumerable. They do not replace authorization checks, so still verify that the current user can access the decoded record.
Is Hashids encryption, and is the salt secret?
No, Hashids is an obfuscation and encoding technique, not encryption. The salt helps vary the output, but it should not be treated as a secret that protects sensitive data. Use Laravel authorization, signed URLs, or encryption when you need actual security guarantees.
What happens if I change the salt or alphabet in production?
Changing the salt, alphabet, or length can make old hashes decode differently or fail to decode with the new configuration. In production, treat those settings as stable once URLs have been shared or indexed. If you must change them, plan a migration or keep the old configuration available for legacy links.
Are there alternatives to Hashids for Laravel ID obfuscation?
Alternatives include UUIDs, Laravel encrypted route parameters, signed URLs, and other ID obfuscation libraries such as Sqids. UUIDs are longer but avoid exposing sequential IDs, while signed URLs add tamper protection. Choose based on whether you need short URLs, reversibility, or security rather than simple obfuscation.
How should I test or maintain a Laravel app using arcanedev/hasher?
Because Hashids output is deterministic for the same configuration, you can test encoding and decoding with fixed salt, length, and alphabet values. Add tests that confirm known IDs round-trip and that invalid hashes are handled gracefully. For maintenance, check the GitHub repository for recent activity, open issues, and compatibility with your Laravel version.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console