jarto / lockbox2

A version of TurboPower LockBox2, that is aimed at being compatible with Delphi, FPC and Lazarus 32/64 bit
26 stars 16 forks source link

How to set the IV? #7

Open silentbug00 opened 2 years ago

silentbug00 commented 2 years ago

I have encrypted file created using Rijndael256+CBC with PHP language. After I decrypt it with lockbox2, I found the decrypted file is missing first 16 bytes/characters. And after I check both of the codes, it turns out the different between them is the PHP code set the IV (initialization vector) but my pascal code don't, because lockbox doesn't provide the property for that. Could you add this feature? Thanks

jarto commented 2 years ago

Sorry but I can't do this. If someone else takes it on, I'll be happy to merge it into LockBox.

silentbug00 commented 2 years ago

Btw, I've solve the issue in my code by xor-ing first 16 chars of the decrypted string with the (16 bytes) iv value from the php code. But I need time to add this to the component. If I'm not too lazy to do that :)

update: this trick is not working :(. Maybe I did something else than this, I forgot... Silly me