This is where your description should go. Try and limit it to a paragraph or two, and maybe throw in a mention of what PSRs you support to avoid any confusion with users and contributors.
Via Composer
$ composer require wodcz/hash-router-extension
then register extension in config.neon:
extensions:
hashRouter: WodCZ\HashRouterExtension\DI\HashRouterExtension
and finally, configure extension:
salt is required. You should pick unique salt, so you get never-seen hashes. styles is array of router styles, which will be handled by this extension. by default only id style is handled
hashRouter:
salt: loremipsum
styles: ['id']
After configuring styles (and cleaning cache), router will automatically hash chosen parameters when generating links and, of course, will translate them back from request.
This extension is only wrapper for hashids library. Look at their official documentation and repository for more information.
TLDR:
- there are no collisions thanks to integer to hex conversion
- you can't encode negative numbers
- you can't encode strings
- you shouldn't encode sensitive data
- you can't encode numbers greater then 1,000,000,000 by default because of php limitations. read more here
- this extension currently doesn't handle component signal parameters, I'm not sure how to handle this nicely
Currently no tests are written, sorry.
$ composer test
Please see CONTRIBUTING and CONDUCT for details.
If you discover any security related issues, please email admin@ikw.cz instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.