antkit
English | 中文
密码学安全的随机 token 与口令生成。
安装
pip install antkit
用法
from antkit import password, token
token() # 22 字符,16 字节熵
token(n_bytes=32)
token(n_urlsafe=False) # hex
password() # 16 位,四类字符全用
password(24, n_symbols=False)
password(12, n_lower=False, n_upper=False)
说明
全部基于 secrets,不用 random(它的种子可预测,不能用于任何不该被猜到的值)。口令保证每个启用的字符类至少出现一次,然后整体打乱,避免保底字符堆在开头。请求不可能满足时抛 ValueError。
许可证
MIT
English
Cryptographically secure tokens and passwords.
Install
pip install antkit
Usage
from antkit import password, token
token() # 22 字符,16 字节熵
token(n_bytes=32)
token(n_urlsafe=False) # hex
password() # 16 位,四类字符全用
password(24, n_symbols=False)
password(12, n_lower=False, n_upper=False)
Notes
Built on secrets, never random. Passwords always contain at least one character from every enabled class, then get shuffled so the guaranteed characters are not stuck at the front. Impossible requests raise ValueError.
License
MIT
Metadata
Release files for antkit 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| antkit-0.0.4.tar.gz | 3.5 kB | Without provenance | Details for antkit-0.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| antkit-0.0.4-py3-none-any.whl | Python 3 | none | any | Details for antkit-0.0.4-py3-none-any.whl |
Total release size: 7.4 kB
Release files / antkit-0.0.4.tar.gz
| Download URL | antkit-0.0.4.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
84f154be2fe267d7955133bbe66cd941c7f6c1d452f4308b7ccab5ef05d2d426
|
|
BLAKE2b-256 checksum How to use checksums |
2b9ae10ec92ca0a57853ac9416ec063c0e85bd493c2a7dcd94e1a6f40bf130ba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.11
|
Release files / antkit-0.0.4-py3-none-any.whl
| Download URL | antkit-0.0.4-py3-none-any.whl |
|---|---|
| Size | 3.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
47b373429799a8802acadcbecebfb670f9365687501fc055d9ea4a562d2253ea
|
|
BLAKE2b-256 checksum How to use checksums |
cff4aff5d97508277cf9691a2cb50820979c909f1f4bc1b56baa7435fc42fed1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.11
|
Security for antkit 0.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.