when i'm trying to use encrypt feature on my project, i get this error:
this is my Application class content:
/* SetUp Application database as encrypted contents */
byte[] key = new byte[64];
new SecureRandom().nextBytes(key);
Realm.init(this);
RealmConfiguration realmConfiguration = new RealmConfiguration.Builder()
.encryptionKey(key)
.name("Application.db")
.deleteRealmIfMigrationNeeded()
.build();
full stack error:
Caused by: io.realm.exceptions.RealmFileException: Unable to open a realm at path '/data/data/com.pishguy.androidapplication.cafemaku/files/Application.db': Realm file decryption failed. in /Users/emanuelez/repos/realm/realm-java-private/realm/realm-library/src/main/cpp/io_realm_internal_SharedRealm.cpp line 81 Kind: ACCESS_ERROR.
when i'm trying to use encrypt feature on my project, i get this error:
this is my Application class content:
full stack error: