Closed huhutm closed 7 years ago
@huhutm This is because encrypted data was padded.
Though the data length changed, there would be no problem decrypting it.
@ifduyue But After I encrypt use the lib, I can't decrypt it with another C program. The C program only decrypt 16 bytes data.
But After I encrypt use the lib, I can't decrypt it with another C program. The C program only decrypt 16 bytes data.
Please read the readme https://github.com/ifduyue/xxtea#xxtea--
The XXTEA algorithm takes a 128-bit key and operates on an array of 32-bit integers (at least 2 integers), but it doesn't define the conversions between bytes and array. Due to this reason, many XXTEA implementations out there are not compatible with each other.
You can only encrypt and decrypt using this python lib, as it's not compatible of any other libs.
OK, thank you!
I use this lib to encrypt 16byte data, after encrypt the data length is 20bytes. Bute C code xxtea will not change the length. Why?