Download the PHP package krowinski/tinyid without Composer

On this page you can find all versions of the php package krowinski/tinyid. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package tinyid

Shorten and obfuscate IDs

PHP Tests Latest Stable Version Total Downloads License Scrutinizer Code Quality Code Coverage

SYNOPSIS

DESCRIPTION

Using real IDs in various places - such as GET links or API payload - is generally a bad idea:

With the help of this module you can shorten and obfuscate your IDs at the same time.

METHODS

new TidyID('qwerty')

Key must consist of at least two unique unicode characters.

The longer the dictionary - the shorter encoded ID.

Encoded ID will be made exclusively out of characters from the key. This very useful property allows to adapt your encoding to the environment. For example in SMS messages you may restrict key to US ASCII to avoid available length reduction caused by conversion to GSM 03.38 charset. Or if you want to use such ID as file/directory name in case-insensitive filesystem you may want to use only lowercase letters in the key.

encode('123')

Encode positive integer into a string.

Note that leading 0s are not preserved, encode('123') is the same as encode('00123').

Used algorithm is a base to the length of the key conversion that maps to distinct permutation of characters. Do not consider it a strong encryption, but if you have secret and long and well shuffled key it is almost impossible to reverse-engineer real ID.

decode('rer')

Decode string back into a positive integer.

TRICKS

If you provide sequential characters in key you can convert your numbers to some weird numeric systems, for example base18:

Or you can go wild just for the fun of it.

COMPATIBLE COUNTERPARTS

Examples are in example dir.


All versions of tinyid with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
krowinski/bcmath-extended Version ^6.0
ext-mbstring Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package krowinski/tinyid contains the following files

Loading the files please wait ....