appkweb/uuid
最新稳定版本:1.0.0
Composer 安装命令:
composer require appkweb/uuid
包简介
Light lib to generate an universally unique identifier V4
README 文档
README
Light lib to generate an universally unique identifier V4
Get started
composer install appkweb/uuid-
public function __construct( private readonly UuidService $uuidService, ) { } /** * @return void * @throws Exception */ public function __invoke():void { echo "{$this->uuidService->generate()}\n"; }
Sources of Entropy
- Generates 16 random bytes with high entropy, which is excellent for value diversity.
- Provides a timestamp in milliseconds, adding a time dimension.
- Includes the process ID, which varies between processes but is stable during the execution of a specific process.
- Generates an additional random number, adding even more diversity.
- Generates a unique identifier based on the current time and a random number, used in the hash to add additional entropy.
统计信息
- 总下载量: 8
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-09-10