From 23811c481acb36dbf79a0cb66a20f6b2581ecc6a Mon Sep 17 00:00:00 2001 From: Alexander Date: Fri, 4 Jan 2019 13:15:06 +0200 Subject: [PATCH] Returned missing backward compatibility for decryption --- Crypto Notepad/MainForm.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Crypto Notepad/MainForm.cs b/Crypto Notepad/MainForm.cs index e817ca5..8f9c857 100644 --- a/Crypto Notepad/MainForm.cs +++ b/Crypto Notepad/MainForm.cs @@ -53,6 +53,15 @@ 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); + } + else + { + 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;