一个基于aes的简单加密/解密库。
su.aes的Python项目详细描述
一个基于aes的简单加密/解密库。
依赖关系
- python 3.6或更高版本
安装
$ pip3 install su.aes
用法
fromsu.aesimportencrypt,decryptinput_text="nihao"secret_key="my_sec_key"encrypted=encrypt(secret_key,input_text)decrypted=decrypt(secret_key,encrypted)assertdecrypted==input_text
控制台
# test for input string $ su-aes INPUT_STR -t -p # file test $ su-aes INPUT_FILE_PATH -f -t -o OUTPUT_FILE_PATH