未提供项目说明
xtwine的Python项目详细描述
TWINE:一种用于多平台的轻量级分组密码
这个知识库是Suzaki Tomoyasu、Kazuhiko Minematsu、Sumio Morioka和Eita Kobayashi介绍的TWINE: A Lightweight Block Cipher for Multiple Platforms论文的实现。在
安装
从PyPI按pip安装:
pip3 install twine
或从github安装最新版本:
^{pr2}$使用
此存储库包含一个命令行工具,可用于使用支持的80位或128位大小的密钥加密明文样本。在
示例1:
xtwine "hello world" -k "<o8~I{?3Uz"
输出:
Encryption Key: "<o8~I{?3Uz"
abb90d4c0a8f67632cec7c01ee409ea1
示例2:
xtwine "01bbed92bccc2104b7e12141f1413ad6" -d -k "4ejqxfDL3#"
输出:
Decryption Key: "4ejqxfDL3#"
hello world
示例3:
xtwine "1 plus 1 equals 2"
输出:
Encryption Key: "8_D]H[!^M*"
0315a70682ac625cdced6a7ff834d629c2b70de4e2d1fc7b
示例4:
xtwine "1 plus 1 equals 2" -z 128
输出:
Encryption Key: "oti,D:H6[5WX|8jS"
7f9c4394decc4c59c94be30b49db5ef66943a2938416382f
示例5:
fromxtwineimportTwinetwine=Twine(key_size=0x50)# If the key param is not specified# it will generate a key automatically.ciphertext=twine.encrypt("hello world")print(ciphertext)# > "abb90d4c0a8f67632cec7c01ee409ea1"plaintext=twine.decrypt(ciphertext)print(plaintext)# > "hello world"
发布历史记录
1.0.2款
- 修补程序:从xtwine进口绳
1.0.1款
- 从/到stdin/stdout读/写。在
关于
贡献
欢迎在GitHub的https://github.com/amoallim15/xtwine上提交错误报告和请求。 我也可以回答问题,随时联系。在
许可证
此代码在MIT下授权。在
- 项目
标签: