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
{{ message }}
This repository was archived by the owner on Jun 23, 2025. It is now read-only.
If I encrypt from windows, browser or native, app doesn't decrypt on android.
If I encrypt from linux, app does decrypt succesfully on android.
Do you know how to create functions, encrypt and decrypt, platform independent?
Here the code:
String encryptAES(String originalText, Key secretKey) {
final encrypter = Encrypter(AES(secretKey, mode: AESMode.cbc));
final encrypted = encrypter.encrypt(originalText, iv: IV.fromLength(16));
return encrypted.base64;
}
String decryptAES(String encryptedText, Key secretKey) {
final encrypter = Encrypter(AES(secretKey, mode: AESMode.cbc));
final encrypted = Encrypted.fromBase64(encryptedText);
final decrypted = encrypter.decrypt(encrypted, iv: IV.fromLength(16));
return decrypted;
}
If I encrypt from windows, browser or native, app doesn't decrypt on android.
If I encrypt from linux, app does decrypt succesfully on android.
Do you know how to create functions, encrypt and decrypt, platform independent?
Here the code: