AES-256-CBC encryption returning different result in Python and PHP , HELPPP
Python Code: from Crypto.Random import get_random_bytes from Crypto.Cipher import AES from Crypto.Util.Padding import pad import base64 def encrypt_string(input_string, key_base64, str_iv): try: key = key_base64.encode('utf-8') if str_iv: iv = base64.b64decode(str_iv) else: iv = get_random_bytes(16) cipher = AES.new(key, AES.MODE_CBC, iv) padded_data =…