Alex Kombo
Alex Kombo

Reputation: 3356

Encrypting Realm Database

I want to encrypt my Realm database and store the key in a secure location.

I have been doing some reading and it seems that storing in the Android KeyStore may not be the best idea since it's based on a device's screen lock.

Moreso, some articles say that if the screen lock is changed between pin, password or pattern, all the keys stored in the Android KeyStore are lost and have to be recreated again.

Is there a more secure way to generate the keys and store them in a different location?

Upvotes: 1

Views: 638

Answers (1)

Arthur Attout
Arthur Attout

Reputation: 2916

What you can do is encrypt your key using whatever algorithm you want (not a deprecated one, obviously) and store it in the internal storage of your app, so it will be private and neither other apps or the user will be allowed to access it.

Upvotes: 1

Related Questions