def aesEncrypt(text, secKey):
pad = 16 - len(text) % 16
text = text + pad * b' ' # chr(pad)
encryptor = AES.new(secKey, 2, '0102030405060708')
ciphertext = encryptor.encrypt(text) # 加密 text
print(ciphertext)
ciphertext = base64.b64encode(ciphertext) #
# return bytes.decode(ciphertext)
return ciphertext
发现相同的 text , secKey 参数,多次运行 aesEncrypt(), print(ciphertext) 的结果不一样, 这不会是 aes 的特性吧??