You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After updating Flutter version pointy castle started to give me errors with the same code.
I am using the encrypt package which uses this package. The same encryption code was working a few days ago, I have upgraded the flutter now its gives me 'package:pointycastle/src/ufixnum.dart': Failed assertion: line 198 pos 10: '(x >= 0) && (x <= _MASK_32)': is not true. error when I try to encrypt something with it. Can anyone explain why this could be happen?
When I downgraded the flutter to 3.19.0 and there is no problem, but after upgrading to 3.19.1 the exception occurs.
Unfortunately I did not! But staying in specific version does it. Just initialize a seperate package with seperate pubspec.yaml so the flutter pub upgrade wont update it. And for some reason if its gonna updated put some description. This is how I solved. Here is my versions:
encrypt: 5.0.3 # last working: 5.0.3pointycastle: 3.9.1 # last working: 3.9.1
And Im using static const AESMode _mode = AESMode.ofb64; as mode now. (Dont really know what changes)
Activity
[-]Update broke my code[/-][+]Flutter upgrade broke my encrytion code[/+]hsynksahin commentedon Feb 27, 2024
Now it happens even in flutter 3.19.0. Can we at least have a error message for this one ?
Problem occurres when I encrypt a dummy password like
123456Using version 3.7.4 (latest) // Also tested at 3.7.3
Encryption (5.0.3)
Here is my flutter doctor at any case:
[-]Flutter upgrade broke my encrytion code[/-][+]'(x >= 0) && (x <= _MASK_32)': is not true[/+]hsynksahin commentedon Feb 27, 2024
The code that trying to encrypt the data:
(IStorageRepository is basicly a SharedPrefferences)
Note: It seems like problem is with the
ofb64Gctr. I switched mode toctrnow I'm not taking any errors.Also oppened an issue at encryption repository to direct here.
dodatw commentedon Oct 18, 2024
Hi hsynksahin
Did you find solution? I face same issue when upgrade from 3.13.7 to 3.24.3.
I cannot reproduce this issue, but on firebase crashlytics:
Using pointycastle (3.7.4) / encrypt (5.0.3)
code
Thanks.
hsynksahin commentedon Oct 18, 2024
Unfortunately I did not! But staying in specific version does it. Just initialize a seperate package with seperate pubspec.yaml so the
flutter pub upgradewont update it. And for some reason if its gonna updated put some description. This is how I solved. Here is my versions:And Im using
static const AESMode _mode = AESMode.ofb64;as mode now. (Dont really know what changes)Hope this will work for you too.