chore: refactor

This commit is contained in:
surtur 2021-06-10 14:35:58 +02:00
parent dd426e5524
commit 2fbf86ecf4
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D

View File

@ -97,7 +97,7 @@ namespace KRY_0x07
string key = textBox1.Text.ToUpper();
string message = textBox2.Text.ToUpper();
int klength = key.Length;
int mlength = message.Length;
int mlength = klength;
int[] m_ints = new int[mlength];
int[] k_ints = new int[klength];
string cryptmessage = "";
@ -119,7 +119,7 @@ namespace KRY_0x07
}
}
for (int i = 0; i <mlength; i++)
for (int i = 0; i < mlength; i++)
{
cryptmessage += alphabet[(m_ints[i] + k_ints[i]) % alphabet.Length];
}