定制 martbock/laravel-diceware 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

martbock/laravel-diceware

最新稳定版本:v2.1.0

Composer 安装命令:

composer require martbock/laravel-diceware

包简介

Diceware Passphrase Generator for Laravel

README 文档

README

Latest Version on Packagist StyleCI Maintainability Code Coverage Build Status

This package makes it easy to generate passphrases that are both secure and easy to remember.

It uses Diceware wordlists and is fully configurable to your needs.

Usage

It's a breeze to generate a random diceware passphrase, simply use the Facade like this:

$passphrase = Diceware::generate();

// returns 'unwind-cosmic-entryway-MAGNETIC-stardust-ligament'
return $passphrase;

Why use it?

For years, we trained everyone to use passwords that are hard for humans to remember but easy for machines to guess. If you don't want to frustrate your users, you should consider using something like Diceware to generate passphrases that are easier to remember and to typewrite.

Perhaps, the problem is best explained by this famous xkcd comic:

xkcd Password Strength Comic

Installation

You can install the package via composer. Next, publish the diceware.php configuration file so can adjust the settings for this package.

composer require martbock/laravel-diceware
php artisan vendor:publish --provider 'Martbock\Diceware\DicewareServiceProvider'

Configuration

You may change the default settings in the diceware.php config file that you can publish to your Laravel config directory after you installed this package. Currently, the following options are supported:

'number_of_words'       => 6,
'separator'             => '-',
'capitalize'            => true,
'add_number'            => false,
'wordlist'              => 'english',
'custom_wordlist_path'  => null,
'number_of_dice'        => 5,

Of course, you can use your own wordlist, just set the custom_wordlist_path accordingly.

License

The PHP implementation is licensed under the MIT license, see LICENSE.md.

The included wordlists have the following licenses:

  • eff.txt is licensed under CC-BY-3.0 by the Electronic Frontier Foundation.
  • english.txt is licensed under CC-BY-3.0 by Arnold G. Reinhold.
  • german.txt is licensed under the GNU General Public License by Benjamin Tenne.

统计信息

  • 总下载量: 58.72k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 32
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 32
  • Watchers: 1
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-11-22