How to decrypt a string in python using RNCryptor

493 Views Asked by At

I'm trying to send an encrypted string from one device to another. The first one (with Swift) encrypts the string using RNCryptor and sends it (as a string). How do I decrypt this encrypted string in Python using RNCryptor?

I tried to decrypt the encrypted string with the normal decryption method provided by RNCryptor, but it says that the string is "bad data".

 cryptor = rncryptor.RNCryptor()
 decrypted_data = cryptor.decrypt(code.data, password)
        # -> ERROR: bad data (code.data is a string)
0

There are 0 best solutions below