Add Encryption Module, remove all encryption Code from Filesystem to prevent circular dependencies

This commit is contained in:
Jonathan Jenne
2021-05-26 16:37:55 +02:00
parent 0e25ec9cec
commit b1b4868010
28 changed files with 542 additions and 15 deletions

View File

@@ -1,6 +1,4 @@
Public Class ClassConstants
Public Const CRYPTO_LEGACY_ENCRYPTION_KEY = "!35452didalog="
Public Const SERVICE_MAX_MESSAGE_SIZE = 2147483647
Public Const SERVICE_MAX_BUFFER_SIZE = 2147483647
Public Const SERVICE_MAX_ARRAY_LENGTH = 2147483647

View File

@@ -10,6 +10,7 @@ Imports DigitalData.GUIs.ZooFlow.ClassConstants
Imports System.Threading
Imports System.Globalization
Imports DigitalData.Modules.EDMI.API
Imports DigitalData.Modules.Encryption
Public Class ClassInit
Private _MainForm As frmFlowForm
@@ -115,7 +116,7 @@ Public Class ClassInit
End Sub
Private Sub CheckConnectivity(MyApplication As My.MyApplication)
Dim oCrypt As New EncryptionLegacy(CRYPTO_LEGACY_ENCRYPTION_KEY)
Dim oCrypt As New EncryptionLegacy()
Dim oBuilder = My.SystemConfig.GetConnectionStringBuilder(My.SystemConfig.ConnectionString)
oBuilder.Password = oCrypt.DecryptData(oBuilder.Password)
Dim oDecryptedConnectionString = oBuilder.ToString

View File

@@ -465,6 +465,10 @@
<Project>{3e7bc8a9-91ef-49b8-8110-2c01f664c24a}</Project>
<Name>SQLEditor</Name>
</ProjectReference>
<ProjectReference Include="..\Encryption\Encryption.vbproj">
<Project>{8a8f20fc-c46e-41ac-bee7-218366cfff99}</Project>
<Name>Encryption</Name>
</ProjectReference>
<ProjectReference Include="..\GUIs.ClipboardWatcher\ClipboardWatcher.vbproj">
<Project>{B7D465A2-AE31-4CDF-A8B2-34B42D3EA84E}</Project>
<Name>ClipboardWatcher</Name>

View File

@@ -1,4 +1,5 @@
Imports DigitalData.Modules.Database
Imports DigitalData.Modules.Encryption
Imports DigitalData.Modules.Filesystem
Imports DigitalData.Modules.Logging
@@ -102,7 +103,7 @@ Public Class frmConfigDatabase
Dim oResult = MessageBox.Show(STRING_CONNECTION_SUCCESSFUL, Text, MessageBoxButtons.YesNo, MessageBoxIcon.Question)
If oResult = DialogResult.Yes Then
Dim oCrypt As New EncryptionLegacy("!35452didalog=")
Dim oCrypt As New EncryptionLegacy()
Dim oEncryptedPassword = oCrypt.EncryptData(txtPassword.Text)
Dim oEncryptedConnectionString = $"Server={txtServerName.Text};Database={cmbDatabase.Text};User Id={txtUserName.Text};Password={oEncryptedPassword};"