python工具,表示用tinyscript制作的bruce schneier的纸牌密码

solitaire-cipher的Python项目详细描述


PyPiPython VersionsPlatformKnown VulnerabilitiesRequirements StatusLicense

目录

简介

这个工具依赖于Tinyscript,实现了bruce schneier的Solitaire Cipher

安装

$ sudo pip install solitaire-cipher

Behind a proxy ?

Do not forget to add option --proxy=http://[user]:[pwd]@[host]:[port] to your pip command.

快速启动

帮助

$ solitaire-cipher --help
usage: solitaire-cipher [-r INI] [-w INI] [-h] [-v] {decrypt,encrypt} ...

SolitaireCipher v1.1
Author   : Alexandre D'Hondt
Copyright: © 2019 AGPLv3 (http://www.gnu.org/licenses/agpl.html)
Reference: https://www.schneier.com/academic/solitaire/

This tool implements the Solitaire Encryption Algorithm of Bruce Schneier.

positional arguments:
  {decrypt,encrypt}     commands
    decrypt             decrypt message
    encrypt             encrypt message

config arguments:
  -r INI, --read-config INI
                        read args from a config file (default: None)
                         NB: this overrides other arguments
  -w INI, --write-config INI
                        write args to a config file (default: None)

extra arguments:
  -h, --help            show this help message and exit
  -v, --verbose         verbose mode (default: False)

Usage examples:
  solitaire-cipher encrypt "AAAAA AAAAA" -p my_super_secret -s
  solitaire-cipher decrypt "AAAAA AAAAA" -p my_super_secret -d deck.txt

加密

$ solitaire-cipher encrypt --help
usage: solitaire-cipher encrypt [-h] [-a A] [-b B] [-d DECK] -p PASSPHRASE
                                [-o OUTPUT] [-s]
                                message

positional arguments:
  message        message to be handled

optional arguments:
  -a A           joker A (default: 53)
  -b B           joker B (default: 54)
  -d DECK        deck file or list of integers (default: 1,2,...,53,54)
  -p PASSPHRASE  passphrase (default: None)
  -o OUTPUT      save the encoded deck to (default: deck.txt)
  -s             shuffle the deck (default: False)

extra arguments:
  -h, --help     show this help message and exit
$ solitaire-cipher encrypt "TEST" -s -p my_super_secret
12:34:56 [INFO] IWEJ
12:34:56 [INFO] 28,48,10,24,3,23,2,38,34,6,30,40,8,4,9,11,15,20,31,47,22,35,45,41,49,43,5,13,25,39,19,12,37,33,36,7,16,B,46,29,50,42,26,1,21,A,17,51,14,27,18,44,32,52
12:34:56 [INFO] Saved the encoded deck to 'deck.txt'

解密

$ solitaire-cipher decrypt --help
usage: solitaire-cipher decrypt [-h] [-a A] [-b B] [-d DECK] -p PASSPHRASE
                                message

positional arguments:
  message        message to be handled

optional arguments:
  -a A           joker A (default: 53)
  -b B           joker B (default: 54)
  -d DECK        deck file or list of integers (default: 1,2,...,53,54)
  -p PASSPHRASE  passphrase (default: None)

extra arguments:
  -h, --help     show this help message and exit
$ solitaire-cipher decrypt "IWEJ" -d deck.txt -p my_super_secret
12:34:56 [INFO] TEST
12:34:56 [INFO] 28,48,10,24,3,23,2,38,34,6,30,40,8,4,9,11,15,20,31,47,22,35,45,41,49,43,5,13,25,39,19,12,37,33,36,7,16,B,46,29,50,42,26,1,21,A,17,51,14,27,18,44,32,52

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

推荐PyPI第三方库


热门话题
java如何在导入到Google工作表时使用ApachePOI显示系列标签   java在Swing表上修改数据生成SQL   java TCP数据包在网络级别合并   java自动连线bean在线程位置为空   javasocket。禁用无线连接时getOutputStream()阻塞   JSON上的javascript字符串数组。stringify输出unicode字符   java在Oracle数据库中存储不同类型数据的最佳体验   Spring MVC中模板引擎后的java进程输出   不知从哪里来的java空字符串。   如何加载java。使用Adobe Flex的客户端的属性文件?   java如何替换多层括号之间的所有内容?   {JSONObject必须以java'开头   java使用commandButton或commandLink返回并管理HTML控件值   java Android大文本视图动态   java JMock需要自定义类   java Android应用程序在emulator中工作,但在设备中失败   java连接到derby数据库时使用什么文件路径格式?   java在一个函数调用中返回两个结果?