def decode_aes256(cipher, iv, data, encryption_key):
if cipher == '<STR_LIT>':<EOL><INDENT>aes = AES.new(encryption_key, AES.MODE_CBC, iv)<EOL><DEDENT>elif cipher == '<STR_LIT>':<EOL><INDENT>aes = AES.new(encryption_key, AES.MODE_ECB)<EOL><DEDENT>else:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>d = aes.decrypt(data)<EOL>unpad = lambda s: s[<NUM_LIT:0>:-ord(d[-<NUM_LIT:1>:])]<EOL>return unpad(d)<EOL>
Decrypt AES-256 bytes.
Allowed ciphers are: :ecb, :cbc.
If for :ecb iv is not used and should be set to "".