The Realm file can be encrypted on disk by passing a 512-bit encryption key (64 bytes) to RealmConfiguration.Builder.encryptionKey ():
byte[] key = new byte[64];
new SecureRandom().nextBytes(key);
RealmConfiguration config = new RealmConfiguration.Builder(context)
.encryptionKey(key)
.build();
Realm realm = Realm.getInstance(config);
, , , AES-256. , Realm .
. , Android KeyStore, :
https://github.com/realm/realm-java/tree/master/examples/encryptionExample