# php-hashing **Repository Path**: liuxiaojinla/php-hashing ## Basic Information - **Project Name**: php-hashing - **Description**: Hasher 存储用户密码提供了安全的 Bcrypt 和 Argon2 哈希加密方式。 - **Primary Language**: PHP - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-05-08 - **Last Updated**: 2022-06-10 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Hasher | 哈希 #### 介绍 Hasher 存储用户密码提供了安全的 Bcrypt 和 Argon2 哈希加密方式。 #### 安装教程 `composer require xin/hashing` #### 使用说明 **配置文件** ```php 'bcrypt', /* |-------------------------------------------------------------------------- | Bcrypt Options |-------------------------------------------------------------------------- | | Here you may specify the configuration options that should be used when | passwords are hashed using the Bcrypt algorithm. This will allow you | to control the amount of time it takes to hash the given password. | */ 'bcrypt' => [ 'rounds' => env('BCRYPT_ROUNDS', 10), ], /* |-------------------------------------------------------------------------- | Argon Options |-------------------------------------------------------------------------- | | Here you may specify the configuration options that should be used when | passwords are hashed using the Argon algorithm. These will allow you | to control the amount of time it takes to hash the given password. | */ 'argon' => [ 'memory' => 65536, 'threads' => 1, 'time' => 4, ], ]; ``` **构建哈希器** ```php $hashManager = new \Xin\Hashing\HashManager(); var_dump($hashManager->make("hello world.")); ```