一个简单的python包来生成可定制的密钥。

key-generator的Python项目详细描述


密钥生成器

PyPI versionGitHub licensePyPI - Python Version

一个简单但高度可定制的python包,用于生成专业密钥。在

安装

使用包管理器pip安装密钥生成器。在

pip install key-generator

使用

^{pr2}$

参数

parametertypeoptionaldefaultdescription
num_of_atomintyes5Number of parts/atoms of the key to be generated.
separatorstring,listyes'-'Separates the parts/atoms by separator is given a string.
If given a list, randomly chooses separators in between the atoms.
min_atom_lenintyes3Minimum length of each part/atom.
max_atom_lenintyes10Maximum length of each part/atom.
type_of_valuestringyes'hex'Can be one of the following 3 options: ^{}, ^{}, ^{}.

^{} -> key can have values only from 0-9, a-f, or A-F(depending on ^{} parameter).
^{} -> key can have values only from a-z or A-Z(depending on ^{} parameter).
^{} -> key can have values only between 0-9.
capitalstringyes'none'Can be one of the following 3 options: ^{}, ^{}, ^{}.

^{} -> All the values in the generated key will be lowercase.
^{} -> All the values in the generated key will be uppercase.
^{} -> A mix of both upper and lower case randomly.
extraslistyes[]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.
seedintyesNoneChoose 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

贡献

欢迎拉取请求。对于重大变化,请先打开一个问题,讨论您希望更改的内容。在

请确保在打开拉取请求之前通过以上所有测试。在

许可证

MIT

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
ws-consumer服务地址中的java动态属性   java如何比较整数列表,然后按升序排序?   javascript我正在使用java脚本调用一个函数,但它没有调用代码下面的方法,也没有调用secretitnames()函数   在文本窗格中多次使用Java insertIcon图标   JavaMSAL安卓。AuthenticationActivity完成,但用于身份验证请求的线程池线程仍处于等待状态   if语句中的java多范围比较   java toString()表示输出   java如何在jcstrest测试中生成指令重新排序   java我怎样才能运行它?   web应用程序中使用Hibernate和Spring的java问题   如何将字符串数据写入Java文本文件   如何在java命令提示符下运行已签名的jar文件?   java从我的菜单调用RCP应用程序   java如何等待Canvas/GraphicsContext完成任务,然后再继续执行代码块?