pYoP0PkMljeh84o1zGPTv2BblcMsRAHi85ZpA5rGPsFe0KElgtQyROLxQoo/FcWzwrsqUYbngDJ5vb+xXmeojCc4Ul3mdhde8DSHHRU937fWrvA8M8JgDULsODf1jUSBjXgkARx7TYA=
Пытаюсь то же самое реализовать на Python
def _pkcs5_pad(s): BS = 16 return s + (BS - len(s) % BS) * chr(BS - len(s) % BS) def encode(data): iv = b'9UCrvdCl' key = ''.join(map(six.unichr, [ 0xA2, 0x15, 0x37, 0x08, 0xCA, 0x62, 0xC1, 0xD2, 0xF7, 0xF1, 0x93, 0xDF, 0xD2, 0x15, 0x4F, 0x79, 0x06, 0x67, 0x7A, 0x82, 0x94, 0x16, 0x32, 0x95 ])).encode('latin-1') cipher = DES3.new(key, DES3.MODE_CBC, IV=iv) data = _pkcs5_pad(data) return base64.b64encode(cipher.encrypt(data)).decode('latin-1') data = 'from=CGK&to=AMQ&sdate=10-01-2018&edate=10-07-2018&type=R&cabin=E&promo=1&adult=1&child=0&infant=0' print(encode(data))
Результат не совпадает (конец строки)
pYoP0PkMljeh84o1zGPTv2BblcMsRAHi85ZpA5rGPsFe0KElgtQyROLxQoo/FcWzwrsqUYbngDJ5vb+xXmeojCc4Ul3mdhde8DSHHRU937fWrvA8M8JgDULsODf1jUSB73S1edTBj01klmzN+KOjNg==
Как исправить?