I am using realm local database, saving sensitive values on it, i already encrypted it. Is it fine to create an object from the realm database and keep it & use it the whole time when the app is running ?
class HomeController extends GetxController {
RealmResults<Animals> animals;
@override
void onInit() {
super.onInit();
animals = realm.all<Animals>();
}
}
(I dont understand securing secret keys and sensitive values in the code, that's why i am confused about all of that)
CodePudding user response:
I assume when state say 'i also encrypted it' that actually means you're using an Encrypted Realm
If that's the case then yes, the data is secure in your local realm and you can use it as described in the question.
If you are using some other method for encryption, I would suggest using an Encrypted Realm instead.
I dont understand securing secret keys and sensitive values in the code
That's because code can be decompiled and parsed - hard coded values could possibly be seen in the clear if that were to happen. Best Practice is to never hard-code passwords or sensitive data in an app.