title: Is it safe to store Encryption Key in defaultConfiguration?
body: <p>My Realm db is encrypted. encryptionKey is stored in Keychain. What is safer way to manage this key?</p>
  
  <p>Currently I'm calling method who sets up defaultConfiguration (schemaVersion, migrationBlock, fileURL, etc and encryptionKey as well) from <code>application(application:didFinishLaunchingWithOptions:)</code>, before any Realms will be instantiated. Later, Realms are instantiated with this defaultConfiguration throughout the app.
  Like that:</p>
  
  <pre><code>// AppDelegate
     var config = Realm.Configuration.defaultConfiguration
     config.schemaVersion = 5
     config.migrationBlock = { migration, oldSchemaVersion in ... }
     config.encryptionKey = KeychainManager.getRealmEncryptionKey()
     Realm.Configuration.defaultConfiguration = config
  
  // Somewhere else, later
     Realm()
  </code></pre>
  
  <p>Is it safe to put encryptionKey into defaultConfiguration? Where is defaultConfiguration stored at runtime and how easy will it be to extrude key from it?</p>
  
  <p>Or preferable way will be to request encryptionKey from Keychain on every Realm instantiation and put it into custom Configuration which will present in memory only during Realm instance's life? Like this:</p>
  
  <pre><code>// AppDelegate
     var config = Realm.Configuration.defaultConfiguration
     config.schemaVersion = 5
     config.migrationBlock = { migration, oldSchemaVersion in ... }
     Realm.Configuration.defaultConfiguration = config
  
  // Somewhere else, later
     var configTemp = Realm.Configuration.defaultConfiguration
     configTemp.encryptionKey = KeychainManager.getRealmEncryptionKey()
     Realm(configuration: configTemp)
  </code></pre>