I created an application that uses SQLite I was instructed in another question to NOT hard code my DB Name
So after learning to store the DB Name in the App.config folder and followup reading New issues have reared the ugly question "Is the DB Name really hidden just because it is in the App.config"
So I opened a test project that I created an EXE file for and I can see the values in the App.config file
Now after reading numerous posts about Encryption of the App.config file I am lost
I am NOT trying to encrypt the entire App.config file
I am NOT trying to encrypt a connecting string unless that is the only option
If I encrypt the DB Name do I need to UN-encrypt it make it available at run time?
This is a WinForms project with VB
I am asking how to preform both function encrypt and UN-encrypt the DB Name?
Here is the App.config file
configuration
startup
supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"
startup
appSettings
add key="dbName" value="Notes.db"
appSettings
configuration
Here is the Sub that loads the DB Name
Public Sub readAppConfig()
Try
Dim appSettings = ConfigurationManager.AppSettings
Dim result As String = appSettings("dbName")
If IsNothing(result) Then
result = "Not found"
End If
gv_dbName = result.ToString.Trim
Catch
tbMessage.Text = "ERROR"
End Try
End Sub