Download the PHP package j3j5/hmac-bcrypt-laravel without Composer

On this page you can find all versions of the php package j3j5/hmac-bcrypt-laravel. 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 hmac-bcrypt-laravel

hmac-bcrypt

Coverage Badge PHPStan Badge, it reads Build status for

This repository contains an implementation of the hmac-bcrypt password hashing function for the Laravel Framework. It is based on the reference implementation created by @epixoip (specifically the PHP one).

If you are asking yourself why, you can read the technical justification on the original implementation.

Installation

If you want to use it, you can use composer:

Configuration

On your config/hashing.php you can change the driver to hmac-bcrypt. In order to work, you need to set a pepper which should be a unique (per project) secret string. You have two options, either set HMAC_BCRYPT_PEPPER on your .env or as an environment variable, or add to your own hashing.php config file the following array:

The amount of rounds used by bcrypt is also customizable. You can use HMAC_BCRYPT_ROUNDS on your .env (or as environment variable) or add the key rounds to the hmac-bcrypt key on your hashing config.

Use

Now you can use it like you would use the hasher on Laravel:

Later on...

Final notes

Although I tried to be very careful and thorough on the implementation, I made this driver for fun so use at your own risk. I encourage you to take a dive into the code to make sure I did not miss anything important or into the tests so you can check for yourself what currently works. Underneath it uses the native PHP functions for SHA512 hash_hmac() and crypt() for the Bcrypt encryption (with a salt generated by random_bytes()), so this is not a case of building your own crypto libraries but instead, using the already available ones.


All versions of hmac-bcrypt-laravel with dependencies

PHP Build Version
Package Version
Requires illuminate/hashing Version ^11.0
illuminate/support Version ^11.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 j3j5/hmac-bcrypt-laravel contains the following files

Loading the files please wait ....