Download the PHP package terpomoj/base64-url-helpers without Composer

On this page you can find all versions of the php package terpomoj/base64-url-helpers. 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 base64-url-helpers

🥔 terpomoj/base64-url-helpers

This package provides two global functions: base64_url_encode and base64_url_decode. I found myself using these helpers in a lot of my projects.

What is Base64 URL?

In RFC 3548, Base64 URL is a variant of Base64 that uses the URL-safe alphabet. Which replaces the + and / characters in standard base64 with - and _. Padding character (=) can be optionally removed or retained.

Usage

Install with composer:

Encode

To encode:

There is also a second optional parameter to base64_url_encode that allow you to specify weather you want to remove padding characters or not. Which is default to true, that will remove padding characters.

Decode

To decode:

Just like PHP's native base64_decode, by default, it allows you to pass a string that is not a valid base64 string.

Why?

The main reason I use URL-safe base64 is to encode binary UUID, so that the UUID in URL can be shorter than HEX-encoded UUID:

License

Licensed under MIT. See LICENSE file more details.


All versions of base64-url-helpers with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0.0
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 terpomoj/base64-url-helpers contains the following files

Loading the files please wait ....