How can I encrypt .realm file w/ openssl command and decrypt on realm studio?


#1

I want to encrypt a realm file w/ openssl command and open it on realm studio.
Does anyone know how to do that?\


(Kræn Hansen) #2

The Realm file is using AES encryption but on its individual “pages”, not the file in its entirety.
The easiest way to achieve this is to copy the schema and data to a new Realm file, which you opened with encryption. Realm JS (and other SDKs) has a method to do this: https://realm.io/docs/javascript/latest/api/Realm.html#writeCopyTo

I’ve created an issue tracking saving a Realm file with encryption from Realm Studio: https://github.com/realm/realm-studio/issues/1215