定制 deable/nanoid 二次开发

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

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

deable/nanoid

最新稳定版本:v1.0.0

Composer 安装命令:

composer require deable/nanoid

包简介

Simplified and secure copy of nanoid in PHP.

关键字:

README 文档

README

Tiny and secure unique string ID generator for PHP.

  • Safe. It uses cryptographically strong random APIs and guarantees a proper distribution of symbols.
  • Small. Only one class to handle all the logic. No dependencies.
  • Compact. It uses more symbols than UUID (A-Za-z0-9) and has the same number of unique options in just 22 symbols instead of 36.

This tool was created based on JS library nanoid as a simplified version of other ported PHP libraries hidehalo/nanoid-php and better/nanoid.

To optimize the length of your unique IDs, use this tool to check collision probabilities. Don't forget that this library uses as default only characters A-Za-z0-9.

Requirements

This library was developed for PHP 7.3 or newer.

Installation

The best way to install this library is using Composer:

$ composer require deable/nanoid

Usage

$id = Deable\Nanoid::generate(22);

Contributing

This is an open source, community-driven project. If you would like to contribute, please follow the code format as used in current sources and submit a pull request.

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-04-07