from binascii import b2a_hex, a2b_hex
a2b_hex hex 轉bytes
b2a_hex bytes 轉hex
from Crypto.Cipher import AES
mode = AES.MODE_CBC crypto = AES.new(key, mode, iv) plain_text = crypto.decrypt(a2b_hex(text))
from binascii import b2a_hex, a2b_hex
a2b_hex hex 轉bytes
b2a_hex bytes 轉hex
from Crypto.Cipher import AES
mode = AES.MODE_CBC crypto = AES.new(key, mode, iv) plain_text = crypto.decrypt(a2b_hex(text))