一个简单的python包来生成可定制的密钥。
key-generator的Python项目详细描述
密钥生成器
一个简单但高度可定制的python包,用于生成专业密钥。在
安装
使用包管理器pip安装密钥生成器。在
pip install key-generator
使用
^{pr2}$参数
parameter | type | optional | default | description |
---|---|---|---|---|
num_of_atom | int | yes | 5 | Number of parts/atoms of the key to be generated. |
separator | string,list | yes | '-' | Separates the parts/atoms by separator is given a string. If given a list, randomly chooses separators in between the atoms. |
min_atom_len | int | yes | 3 | Minimum length of each part/atom. |
max_atom_len | int | yes | 10 | Maximum length of each part/atom. |
type_of_value | string | yes | 'hex' | Can be one of the following 3 options: ^{ ^{ ^{ ^{ |
capital | string | yes | 'none' | Can be one of the following 3 options: ^{ ^{ ^{ ^{ |
extras | list | yes | [] | List of extra symbols or characters that you want to include in each part/atom. Adds these symbols to the bucket to randomly choose characters in the atom. |
seed | int | yes | None | Choose a seed value for the random key generated. Returns the same pseudo-random value every time for a given seed value. |
测试
运行以下命令并检查所有测试是否通过。在
>> git clone https://github.com/Sahith02/key-generator.git >> cd key-generator/tests >> python test.py # will show how many tests passed and how many failed
贡献
欢迎拉取请求。对于重大变化,请先打开一个问题,讨论您希望更改的内容。在
请确保在打开拉取请求之前通过以上所有测试。在
许可证
- 项目
标签: