jstewmc/create-token
Composer 安装命令:
composer require jstewmc/create-token
包简介
Create an opaque token
README 文档
README
A create-token service.
use Jahuty\CreateToken\Create; (new Create())(8); // returns something like "12a8b53c" (new Create())(16); // returns something like "8ab5dfaef3d2c999"
Security
This library uses the random_bytes() PHP function. According to PHP's manual, the function generates cryptographically secure, psuedo-random, opaque tokens suitable for salts, keys, and initialization vectors.
Length
Keep in mind, length is important when creating an opaque token. To provide sufficient randomness, a token's length SHOULD equal the length of the hash function's output. For example, a token that's hashed via SHA-256 should be 64 characters long; a token that's hashed via SHA-512 should be 128 characters long; so on and so forth.
License
Author
Version
1.0.0, August 16, 2016
- First major release
0.1.0, July 28, 2016
- Initial release
统计信息
- 总下载量: 18
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-08-07