from Cryptodome.Cipher import AES from binascii import a2b_base64, b2a_base64 import base64 ''' ECB没有偏移量 ''' KEY = '9' * 16 def pad(text): '''给text补 ''' mod = len(text.encode('utf8')) % 16 if mod: add = 16 - mod else: add = 0 text = text + '