密码短语生成器
项目描述
通过随机选择和连接列表中的单词来生成密码短语。
注意: 此项目不再维护。请改用 xkcdpass。
安装
使用 pip 安装Keysmith。
pip install keysmith
使用方法
Keysmith可以从命令行调用或在Python中导入。
命令行界面
$ keysmith --help usage: keysmith [-h] [--delimiter DELIMITER] [--encoding ENCODING] [--nsamples NTEETH] [--population POPULATION] [--stats] [--version] optional arguments: -h, --help show this help message and exit --delimiter DELIMITER a delimiter for the samples (teeth) in the key (default: ) --encoding ENCODING the encoding of the population file (default: utf-8) --nsamples NTEETH, -n NTEETH the number of random samples to take (default: 6) --population POPULATION, -p POPULATION alphanumeric, ascii_letters, digits, printable, or a path to a file of line-delimited items (default: /usr/share/dict/words) --stats show statistics for the key (default: False) --version show program's version number and exit
$ keysmith -n4 correct horse battery staple
API
>>> import keysmith
>>> help(keysmith)
>>> with open('/usr/share/dict/words', 'r') as words:
... keysmith.key(seq=list(words), nteeth=4, delimiter=' ')
...
'correct horse battery staple'
项目详情
下载文件
下载适合您平台的应用程序。如果您不确定选择哪个,请了解更多关于 安装包 的信息。
源分布
keysmith-3.0.1.tar.gz (3.4 kB 查看哈希值)
构建分布
keysmith-3.0.1-py3-none-any.whl (4.5 kB 查看哈希值)