dkzr/anu-quantum-random-engine
最新稳定版本:v1.1.1
Composer 安装命令:
composer require dkzr/anu-quantum-random-engine
包简介
\Random\Engine implementation using the api.quantumnumbers.anu.edu.au service
README 文档
README
Based on work by Setrak Balian in Python.
Use the PHPv82+ \Random\Randomizer class with real quantum random numbers from
ANU. The default pseudo-random generator is replaced by calls to
the ANU API.
ANU API KEY required
Get your API KEY at https://quantumnumbers.anu.edu.au/pricing.
Please note
The free licence currently only allows for 100 requests per month (and 1 request per second).
Usage
$r = new \Random\Randomizer(
new \DKZR\ANUQuantumRandomEngine( $anu_api_key )
);
echo "Lucky Number: ", $r->getInt(0, 99), "\n";
License
See LICENCE.
Inspiration
A podcast by Hens Zimmerman pointed me to the ANU service and the Python library. Thank you!
Documentation
The \DKZR\ANUQuantumRandomEngine() class takes two parameters:
- string
$aqn_api_key: Your AQN API key, see AQN pricing. - optional int
$length: API requests length of the array to return. Defaults to 1024, must be between 1-1024. See AQN documentation.
统计信息
- 总下载量: 2
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-08-15