bricke / Qt-AES

Native Qt AES encryption class
The Unlicense
508 stars 187 forks source link

Fix ISO removePadding #19

Closed tomgey closed 5 years ago

tomgey commented 5 years ago

Fix removing of ISO padding when no padding was added.

bricke commented 5 years ago

What problem does this solves?

tomgey commented 5 years ago

Whenever the decrypted data had no padding, on removing the padding ret.lastIndexOf(0x80) returned -1 which resulted in returning empty data. It could also possibly return only a part of the decrypted data if there is no padding and somewhere in the data the byte 0x80 .