redpanda / hashids-service-provider
Hashids for Silex
Installs: 40
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/redpanda/hashids-service-provider
Requires
- hashids/hashids: dev-master
- silex/silex: ~1.0
Requires (Dev)
- phpunit/phpunit: ~3.7
This package is not auto-updated.
Last update: 2025-10-11 20:20:10 UTC
README
Usage
use Redpanda\Silex\Provider\HashidsServiceProvider; use Silex\Application; use Symfony\Component\HttpFoundation\Request; $app = new Application(); $app->register(new HashidsServiceProvider(), array( 'hashids.options' => array( 'post' => array( 'salt' => 'mySalt', 'min_hash_length' => 5, 'alphabet' => '' ) ) )); // encrypt $hash = $app['hashids']['post']->encrypt(1,2,3); // decrypt $numbers = $app['hashids']['post']->decrypt($hash);
##License
MIT License