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
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;
}
The text was updated successfully, but these errors were encountered:
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:
The text was updated successfully, but these errors were encountered: