承接 cviebrock/artisan-hash 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

cviebrock/artisan-hash

Composer 安装命令:

composer require cviebrock/artisan-hash

包简介

Adds Artisan tasks to Laravel to work with password hashes from the CLI.

README 文档

README

Adds Artisan tasks to Laravel to work with password hashes from the CLI.

Latest Stable Version Total Downloads

Installation

First, add the package to the require-dev attribute of your composer.json file:

{
    "require": {
        "cviebrock/artisan-hash": "1.*"
    },
}

You could add it to the require section instead, but you likely only need this during development.

Next, update Composer from the Terminal:

composer update --dev

Once this operation completes, add the service provider. Open app/config/app.php, and add a new item to the providers array.

'Cviebrock\ArtisanHash\ArtisanHashServiceProvider'

That's it! Run the artisan command from the Terminal to see the new commands.

php artisan

Usage

hash:make

This will hash the given plaintext string and output the hash to the console. If you don't provide a string, you will be asked to enter one (this will keep the plaintext string out of your shell history).

$ php artisan hash:make foo
$2y$08$3nq5mD1faNAPUdyt72yyqOTRl/OIrizhQ84EnH1kbouC/8ud31smW

hash:check

This will compare a given hash to a plaintext string and see if they match.

$ php artisan hash:check '$2y$08$3nq5mD1faNAPUdyt72yyqOTRl/OIrizhQ84EnH1kbouC/8ud31smW' foo
Hash matches.

Note that if the hash contains dollar signs -- as it likely will -- you will need to escape them in your shell. The easiest way is just to surround the hash in single quotes, or don't provide the hash via the command and use the prompt.

The command will also check if the hash needs rehashing.

$ php artisan hash:check '$1$stCkrNrE$W92vGH25VHnLK.kDBmZwz0' foo
Hash matches.
Your hash needs to be rehashed.

Bugs, Suggestions and Contributions

Please use Github for bugs, comments, suggestions.

  1. Fork the project.
  2. Create your bugfix/feature branch and write your (well-commented) code.
  3. Create unit tests for your code:
    • Run composer install --dev in the root directory to install required testing packages.
    • Add your test methods to artisan-hash/tests/.
    • Run vendor/bin/phpunit to the new (and all previous) tests and make sure everything passes.
  4. Commit your changes (and your tests) and push to your branch.
  5. Create a new pull request against the artisan-hash develop branch.

Please note that you must create your pull request against the develop branch.

Copyright and License

artisan-hash was written by Colin Viebrock and released under the MIT License. See the LICENSE file for details.

Copyright 2014 Colin Viebrock

cviebrock/artisan-hash 适用场景与选型建议

cviebrock/artisan-hash 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 84 次下载、GitHub Stars 达 9, 最近一次更新时间为 2014 年 04 月 25 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 cviebrock/artisan-hash 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 cviebrock/artisan-hash 我们能提供哪些服务?
定制开发 / 二次开发

基于 cviebrock/artisan-hash 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 84
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 10
  • 点击次数: 9
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 9
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-04-25