carlonicora / minimalism-service-encrypter
Id encrypter service for minimalism
Requires
- php: >=8.1
- carlonicora/minimalism: ~13.0
- carlonicora/minimalism-interface-encrypter: ~1.0
- hashids/hashids: ~4.0
This package is auto-updated.
Last update: 2024-12-12 18:20:19 UTC
README
encrypter is a service for minimalism to generate short unique ids from integers.
Getting Started
To use this library, you need to have an application using minimalism. This library does not work outside this scope.
Prerequisite
You should have read the minimalism documentation and understand the concepts of services in the framework.
Encrypter requires either the BC Math or GMP extension in order to work.
Installing
Require this package, with Composer, in the root directory of your project.
$ composer require carlonicora/minimalism-service-encrypter
or simply add the requirement in composer.json
{ "require": { "carlonicora/minimalism-service-encrypter": "~1.0" } }
Deployment
This service requires you to set up two parameters in your .env
file in order to produce unique encrypted ids.
Required parameters
#a random string used to encrypt your ids MINIMALISM_SERVICE_ENCRYPTER_KEY=
Optional parameters
#default to 18 MINIMALISM_SERVICE_ENCRYPTER_LENGTH=
Build With
- minimalism - minimal modular PHP MVC framework
- hashids
Versioning
This project use Semantiv Versioning for its tags.
Authors
- Carlo Nicora - Initial version - GitHub | phlow
- Sergey Kuzminich - maintenance and expansion - GitHub |
License
This project is licensed under the MIT license - see the LICENSE.md file for details