Download the PHP package tal7aouy/hashlib without Composer

On this page you can find all versions of the php package tal7aouy/hashlib. 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 hashlib

HashLib

The HashLib library provides a convenient and flexible way to generate, hash, and validate passwords with various options and requirements. It includes a trait named Hasher that defines password generation, validation, and requirement checking functionalities.

Table of Contents

  1. Introduction
  2. Installation
  3. Usage
    • Basic Hashing
    • Hashing with Salt
    • Password Requirement Checking
  4. Methods
    • setLength
    • setUseLowerCase
    • setUseUpperCase
    • setUseNumbers
    • setUseSymbols
    • setPasswordRequirements
    • generateSalt
    • isHashed
    • hash
    • verify
    • hashWithSalt
    • verifyWithSalt
    • setPassword
    • getPassword
    • meetsRequirements
  5. Conclusion

Introduction

The HashLib library is designed to simplify password hashing and verification in PHP applications. It offers a trait called Hasher that can be easily incorporated into your own classes to handle password-related operations.

Installation

The library can be installed using Composer:

Usage

Basic Hashing

Hashing with Salt

Password Requirement Checking

Methods

For a comprehensive list of methods and their descriptions, please refer to the full documentation.

Below is a quick overview of some of the key methods available in the HashLib library:

setLength

Set the minimum required length for generated passwords.

setUseLowerCase

Specify whether lowercase letters are required in generated passwords.

setUseUpperCase

Specify whether uppercase letters are required in generated passwords.

setUseNumbers

Specify whether numbers are required in generated passwords.

setUseSymbols

Specify whether symbols are required in generated passwords.

setPasswordRequirements

Set multiple password requirements at once.

generateSalt

Generate a random salt using base64 encoding.

isHashed

Check if a password is already hashed.

hash

Hash a password using the specified algorithm and options.

verify

Verify if a password matches a given hash.

hashWithSalt

Hash a password with a randomly generated salt.

verifyWithSalt

Verify if a password, when combined with a salt, matches a given hash.

setPassword

Set the password to be used for hashing and validation.

getPassword

Get the currently set password.

meetsRequirements

Check if a given password meets the specified requirements.

For detailed usage instructions and examples, please see the Usage section above.

conclusion

Version: 1.0.0

License: MIT

For any questions, issues, or feedback, please reach out to the library's author, Mhammed Talhaouy.


All versions of hashlib with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
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 tal7aouy/hashlib contains the following files

Loading the files please wait ....