尝试像这样从Python加密。
然后可以从Go成功解密结果。
#!/usr/bin/env python3import base64from Crypto.Cipher import AESMODE = AES.MODE_CFBBLOCK_SIZE = 16SEGMENT_SIZE = 128def _pad_string(value): length = len(value) pad_size = BLOCK_SIZE - (length % BLOCK_SIZE) return value.ljust(length + pad_size, 'x00')def encrypt(key, iv, plaintext): aes = AES.new(key, MODE, iv, segment_size=SEGMENT_SIZE) plaintext = _pad_string(plaintext) encrypted_text = aes.encrypt(plaintext) return encrypted_textkey = 'TfvY7I358yospfWKcoviZizOShpm5hyH'iv = 'mb13KcoviZizvYhp'original_message = 'This is not encrypted'encryptedpayload = base64.b64enpre(encrypt(key, iv, original_message))print('Going to encrypt and base64 "{}" result:n{}n'.format(original_message,encryptedpayload))来源:http://chase-seibert.github.io/blog/2016/01/29/cryptojs-pycrypto-
ios-aes256.html



