mogol / flutter_secure_storage

A Flutter plugin to store data in secure storage
https://pub.dartlang.org/packages/flutter_secure_storage
BSD 3-Clause "New" or "Revised" License
1.12k stars 367 forks source link

Does changing storageCipherAlgorithm for androidOptions make previously written values update its algorithm? #627

Closed Baaaaatz closed 1 month ago

Baaaaatz commented 11 months ago

I am maintaining an app with relatively outdated versions of packages which includes flutter_secure_storage.

I am using 5.0.2 in my current setup. A requirement arose to update cipher algorithm AES_GCM_NoPadding. So I updated the package to 6.0.0 because this is the latest that our app can support without having issues with other dependencies.

Upon testing there is no problem when we're updating the algorithm. My only worry is that under the hood does my previously written values are updated to the new algorithm? as there is no information about it in the documentation only about encryptedSharedPreference.

Previous implementation (5.0.2): FlutterSecureStorage();

After migration (6.0.0):

FlutterSecureStorage(
      aOptions: AndroidOptions.defaultOptions.copyWith(
        encryptedSharedPreferences: true,
        storageCipherAlgorithm: StorageCipherAlgorithm.AES_GCM_NoPadding,
        keyCipherAlgorithm: KeyCipherAlgorithm.RSA_ECB_PKCS1Padding,
      ),
)

Thank you so much.

juliansteenbakker commented 1 month ago

I am closing all older issues. If this issue still exists in the latest version, please let me know.