library hashids-service-provider
Hashids for Silex
redpanda/hashids-service-provider
Hashids for Silex
- Sunday, May 11, 2014
- by redpanda
- Repository
- 0 Watchers
- 0 Stars
- 39 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 1 Versions
- 0 % Grown
HashidsServiceProvider
, (*1)
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, (*2)
dev-master
9999999-dev
Hashids for Silex
Sources
Download
MIT
The Requires
The Development Requires
by
Jimmy Leger
silex
hashids