diff --git a/Crypto Notepad/MainForm.cs b/Crypto Notepad/MainForm.cs index 8f9c857..158fbec 100644 --- a/Crypto Notepad/MainForm.cs +++ b/Crypto Notepad/MainForm.cs @@ -54,6 +54,7 @@ private void DecryptAES() string opnfile = File.ReadAllText(OpenFile.FileName); string NameWithotPath = Path.GetFileName(OpenFile.FileName); string de; + if (ps.TheSalt != null) { de = AES.Decrypt(opnfile, TypedPassword.Value, ps.TheSalt, ps.HashAlgorithm, ps.PasswordIterations, ps.KeySize); @@ -63,7 +64,6 @@ private void DecryptAES() de = AES.Decrypt(opnfile, TypedPassword.Value, null, ps.HashAlgorithm, ps.PasswordIterations, ps.KeySize); } - string de = AES.Decrypt(opnfile, TypedPassword.Value, null, ps.HashAlgorithm, ps.PasswordIterations, ps.KeySize); CustomRTB.Text = de; Text = appName + NameWithotPath;