承接 clickalicious/rng 相关项目开发

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

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

clickalicious/rng

Composer 安装命令:

composer require clickalicious/rng

包简介

The secure Pseudo Random Number Generator (PRNG) for PHP.

README 文档

README

Logo of rng

The secure Pseudo Random Number Generator PRNG for PHP.

Build Status Codacy branch grade Codacy coverage clickalicious open source
GitHub release license Issue Stats Dependency Status

Table of Contents

Features

  • Provides a secure PRNG: pseudo random number generator (64-Bit support)
  • OOP facade to PHP core functionality
  • High performance (developed using a profiler)
  • Lightweight and high-quality codebase (following PSR standards e.g. PSR-1,2,4)
  • Stable, clean + well documented code
  • Unit-tested with a good coverage

Examples

Generate random number between 1 and 10 using OPEN_SSL random bytes (library default):

$generator = new \Clickalicious\Rng\Generator();
$number    = $generator->generate(1, 10);
echo $number;

Generate random number between 1 and 10 using PHP_MERSENNE_TWISTER random bytes:

$generator = new \Clickalicious\Rng\Generator(\Clickalicious\Rng\Generator::MODE_PHP_MERSENNE_TWISTER);
$number    = $generator->generate(1, 10);
echo $number;

Generate 16 random bytes using MODE_OPEN_SSL random bytes (library default):

$generator = new \Clickalicious\Rng\Generator();
$bytes     = $generator->getRandomBytes(16);

Generate 32 random bytes using NATIVE-PHP random bytes:

$generator = new \Clickalicious\Rng\Generator();
$bytes     = $generator->getRandomBytes(32);

Visualization

You can create a visualization of randomization (as you can see below but larger size) through visual.php » (the file is located in root). As you may see: The first square (light grey) is the default PHP random generated noise which is aligned by a pattern (you will see in the large version of the picture). The following three squares a generated using a more secure generator like Open-SSL for example.

Logo of rng

Requirements

  • PHP >= 5.6 (compatible up to version 7.2 as well as HHVM)

Philosophy

This library provides a state of the art PRNG (Pseudo Random Number Generator) implementation to generate secure Pseudo Random Numbers with PHP. The generation is either based on Open SSL or MCrypt or as fallback on PHP's internal functionality. The library also provides a very good Seed generator on puplic API. If you are interested in the difference between real and pseduo randomness then you could start at https://www.random.org/randomness/.

Scott Adams

DILBERT © 2001 Scott Adams.

Versioning

For a consistent versioning i decided to make use of Semantic Versioning 2.0.0 http://semver.org. Its easy to understand, very common and known from many other software projects.

Roadmap

  • No open issues.

Throughput Graph

Security Issues

If you encounter a (potential) security issue don't hesitate to get in contact with us opensource@clickalicious.de before releasing it to the public. So i get a chance to prepare and release an update before the issue is getting shared. Thank you!

Participate & Share

... yeah. If you're a code monkey too - maybe we can build a force ;) If you would like to participate in either Code, Comments, Documentation, Wiki, Bug-Reports, Unit-Tests, Bug-Fixes, Feedback and/or Critic then please let me know as well!

Sponsors

Thanks to our sponsors and supporters:

JetBrains Navicat
Copyright
Icons made by Freepik from www.flaticon.com is licensed by CC 3.0 BY

clickalicious/rng 适用场景与选型建议

clickalicious/rng 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2.92k 次下载、GitHub Stars 达 1, 最近一次更新时间为 2015 年 03 月 21 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「generator」 「number」 「random」 「openssl」 「PRNG」 「RNG」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

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

围绕 clickalicious/rng 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

  • 总下载量: 2.92k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 28
  • 依赖项目数: 3
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-03-21