Download the PHP package northlands/permuteseq without Composer
On this page you can find all versions of the php package northlands/permuteseq. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download northlands/permuteseq
More information about northlands/permuteseq
Files in northlands/permuteseq
Package permuteseq
Short Description A small PHP library to obfuscate numbers.
License MIT
Homepage https://github.com/northlands/permuteseq
Informations about the package permuteseq
A small PHP library to obfuscate numbers. Use it when you don't want to expose your database numeric ids to users.
The permutations are collision-free and fully deterministic. The random-looking effect is due to encryption, not to a PRNG. The same boundary range with the same secret key will always produce the same output.
Installation
You can install the package via composer:
Usage
Testing
In order to ensure compability with the Postgres extension, an integration test is included:
The integration test requires a running Postgres database with the extension installed:
Changelog
Please see CHANGELOG for more information on what has changed recently.
Disclaimer
The library should not be considered cryptographically strong or used to sensitive data.
Credits
-
https://github.com/dverite/permuteseq \ The PostgreSQL extension by Daniel Vérité.
- https://czep.net/21/obfuscate.html \ An article on how to obfuscate primary keys in databases.
Alternatives
-
https://github.com/ioleo/cryptomute \ Another Format Preserving Encryption library supporting multiple ciphers (DES, AES and Camellia) but slower performance.
-
https://github.com/vinkla/hashids \ Generates YouTube-like ids from numbers. Can be limited to digit-alphabet, but returns strings like
"09284"instead of safe integers. - https://github.com/jenssegers/optimus \ Super-fast number obfuscation based on Knuth's integer hash. However, range can only be defined by 4-62 bits.
License
The MIT License (MIT). Please see License File for more information.