Open SevenCho opened 3 years ago
@are the ECB mode doesn't require an IV. Do you have fresh in mind why this check? Can I just remove it?
That was because the _buildParams
method uses the ParametersWithIV
class that requires iv
to be not null, so the check was added to make sure its supplied.
Right, thanks.
@SevenCho can you workaround this by now please giving a meaningless IV?
final encrypted = encrypter.encryptBytes(input, iv: IV.fromLength(16));
I will be thinking on a proper strategy to handle this.
Right, thanks.
@SevenCho can you workaround this by now please giving a meaningless IV?
final encrypted = encrypter.encryptBytes(input, iv: IV.fromLength(16));
I will be thinking on a proper strategy to handle this.
Giving a meaningless IV that works. I tried different meaningless IVs. but I don’t know if this will cause potential problems.
final iv = IV.fromBase16("");
final iv = IV.fromLength(16);
Don't worry, for ECB it will just be ignored.
Please fix this, ECB does not require an IV. So supplying an IV should not be required. Also worse is that the function still fails if you provide
null
, even though signature specifically allows it:https://pub.dev/documentation/encrypt/latest/encrypt/Encrypter/encrypt.html
but in my case it still giving an error
Right, thanks.
@SevenCho can you workaround this by now please giving a meaningless IV?
final encrypted = encrypter.encryptBytes(input, iv: IV.fromLength(16));
I will be thinking on a proper strategy to handle this.
I think moving the iv == null
check into the _buildParams
method right before the return would solve this?
Upgrade from 4.0.4 to 5.0.0, the original encryption algorithm is wrong。