Download the PHP package richard8768/hashing without Composer

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

Hyperf 哈希组件

该组件为存储用户密码提供了安全的 Bcrypt 和 Argon2 哈希加密方式。

移植自 illuminate/hashing

安装

发布配置

配置文件位于 config/autoload/hashing.php

默认配置

你可以在 config/autoload/hashing.php 配置文件中配置默认哈希驱动程序。目前支持三种驱动程序: Bcrypt 和 Argon2(Argon2i 和 Argon2id variants)。

注意:Argon2i 驱动程序需要 PHP 7.2.0 或更高版本,而 Argon2id 驱动程序则需要 PHP 7.3.0 或更高版本。

使用

你可以通过 \HyperfExt\Hashing\Hash 类来加密你的密码:

调整 Bcrypt 加密系数

如果使用 Bcrypt 算法,你可以在 make 方法中使用 rounds 选项来配置该算法的加密系数。然而,对大多数应用程序来说,默认值就足够了:

调整 Argon2 加密系数

如果使用 Argon2 算法,你可以在 make 方法中使用 memorytimethreads 选项来配置该算法的加密系数。然后,对大多数应用程序来说,默认值就足够了:

有关这些选项的更多信息,请查阅 PHP 官方文档

密码哈希验证

check 方法能为您验证一段给定的未加密字符串与给定的哈希值是否一致:

检查密码是否需要重新哈希

needsRehash 方法可以为您检查当哈希的加密系数改变时,您的密码是否被新的加密系数重新加密过:

使用指定驱动

使用自定义哈希类

实现 \HyperfExt\Hashing\Contract\DriverInterface 接口,并参照配置文件中的其他算法进行配置。


All versions of hashing with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
hyperf/config Version ^3.0
hyperf/di Version ^3.0
hyperf/framework Version ^3.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 richard8768/hashing contains the following files

Loading the files please wait ....