mirror of
https://github.com/daiyanan1992/qinglongtest
synced 2025-12-18 15:54:34 +08:00
pycryptdemo加密库检测提示
This commit is contained in:
@@ -9,7 +9,11 @@ aes加密解密工具 目前仅支持ECB/CBC 块长度均为128位 padding只支
|
|||||||
pycryptdemo限制 同一个aes加密对象不能即加密又解密 所以当加密和解密都需要执行时 需要重新new一个对象增加额外开销
|
pycryptdemo限制 同一个aes加密对象不能即加密又解密 所以当加密和解密都需要执行时 需要重新new一个对象增加额外开销
|
||||||
-- A cipher object is stateful: once you have encrypted a message , you cannot encrypt (or decrypt) another message using the same object.
|
-- A cipher object is stateful: once you have encrypted a message , you cannot encrypt (or decrypt) another message using the same object.
|
||||||
"""
|
"""
|
||||||
from Crypto.Cipher import AES
|
try:
|
||||||
|
from Crypto.Cipher import AES
|
||||||
|
except:
|
||||||
|
print("检测到还未安装 pycryptdemo 请按照md的方法安装")
|
||||||
|
exit(0)
|
||||||
from binascii import b2a_hex, a2b_hex
|
from binascii import b2a_hex, a2b_hex
|
||||||
from base64 import b64encode, b64decode
|
from base64 import b64encode, b64decode
|
||||||
class AES_Ctypt:
|
class AES_Ctypt:
|
||||||
|
|||||||
@@ -15,7 +15,11 @@ aes加密解密工具 目前仅支持ECB/CBC 块长度均为128位 padding只支
|
|||||||
pycryptdemo限制 同一个aes加密对象不能即加密又解密 所以当加密和解密都需要执行时 需要重新new一个对象增加额外开销
|
pycryptdemo限制 同一个aes加密对象不能即加密又解密 所以当加密和解密都需要执行时 需要重新new一个对象增加额外开销
|
||||||
-- A cipher object is stateful: once you have encrypted a message , you cannot encrypt (or decrypt) another message using the same object.
|
-- A cipher object is stateful: once you have encrypted a message , you cannot encrypt (or decrypt) another message using the same object.
|
||||||
"""
|
"""
|
||||||
from Crypto.Cipher import AES, DES, DES3
|
try:
|
||||||
|
from Crypto.Cipher import AES, DES, DES3
|
||||||
|
except:
|
||||||
|
print("检测到还未安装 pycryptdemo 请按照md的方法安装")
|
||||||
|
exit(0)
|
||||||
from binascii import b2a_hex, a2b_hex
|
from binascii import b2a_hex, a2b_hex
|
||||||
from base64 import b64encode, b64decode
|
from base64 import b64encode, b64decode
|
||||||
|
|
||||||
|
|||||||
@@ -4,8 +4,12 @@
|
|||||||
# @Author : github@limoruirui https://github.com/limoruirui
|
# @Author : github@limoruirui https://github.com/limoruirui
|
||||||
# @Time : 2022/8/23 13:05
|
# @Time : 2022/8/23 13:05
|
||||||
# -------------------------------
|
# -------------------------------
|
||||||
from Crypto.PublicKey.RSA import importKey, construct
|
try:
|
||||||
from Crypto.Cipher import PKCS1_v1_5
|
from Crypto.PublicKey.RSA import importKey, construct
|
||||||
|
from Crypto.Cipher import PKCS1_v1_5
|
||||||
|
except:
|
||||||
|
print("检测到还未安装 pycryptdemo 请按照md的方法安装")
|
||||||
|
exit(0)
|
||||||
from base64 import b64encode
|
from base64 import b64encode
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user