ui: explain plz
* provide more information with the error message
This commit is contained in:
parent
e1688c9b84
commit
79b446494f
|
@ -84,7 +84,7 @@ namespace KRY_0x01_ng
|
||||||
if (str_to_check.Length < 9)
|
if (str_to_check.Length < 9)
|
||||||
{
|
{
|
||||||
/* because why not, 8 is still lame */
|
/* because why not, 8 is still lame */
|
||||||
MessageBox.Show($"The key is too short ({str_to_check.Length} characters).\nKey requirements: 9-25 unique alphabetic characters", "Error");
|
MessageBox.Show($"The key is too short ({str_to_check.Length} characters).\nKey requirements: 9-25 unique alphabetic characters", "Error: short key");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else if (str_to_check.Length > 25)
|
else if (str_to_check.Length > 25)
|
||||||
|
@ -96,7 +96,7 @@ namespace KRY_0x01_ng
|
||||||
Match match = Regex.Match(str_to_check, @"\d|\s+");
|
Match match = Regex.Match(str_to_check, @"\d|\s+");
|
||||||
if (match.Success)
|
if (match.Success)
|
||||||
{
|
{
|
||||||
MessageBox.Show("Only alphabetic characters are allowed.\nCheck the key for numbers, symbols or tab whitespace and remove them before continuing.", "Error");
|
MessageBox.Show("Only alphabetic characters are allowed.\nCheck the key for numbers, symbols or tab whitespace and remove them before continuing.", "Error: invalid chars in key");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -159,7 +159,7 @@ namespace KRY_0x01_ng
|
||||||
Match match = Regex.Match(msg, @"\d|\s+");
|
Match match = Regex.Match(msg, @"\d|\s+");
|
||||||
if (match.Success)
|
if (match.Success)
|
||||||
{
|
{
|
||||||
MessageBox.Show("Only alphabetic characters and spaces are allowed.\nCheck the message for numbers, symbols or tab whitespace and remove them before continuing.\nAlso, \"W\" will be replaced by \"V\".", "Error");
|
MessageBox.Show("Only alphabetic characters and spaces are allowed.\nCheck the message for numbers, symbols or tab whitespace and remove them before continuing.\nAlso, \"W\" will be replaced by \"V\".", "Error: invalid chars in message");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
msg = msg.Replace("W", "V");
|
msg = msg.Replace("W", "V");
|
||||||
|
@ -178,7 +178,7 @@ namespace KRY_0x01_ng
|
||||||
Match match = Regex.Match(msg, @"\d|\s+|W");
|
Match match = Regex.Match(msg, @"\d|\s+|W");
|
||||||
if (match.Success)
|
if (match.Success)
|
||||||
{
|
{
|
||||||
MessageBox.Show("Only alphabetic characters (with the exception of W) are allowed.\nCheck the cryptmessage for numbers, symbols or tab whitespace and remove them before continuing.", "Error");
|
MessageBox.Show("Only alphabetic characters (with the exception of W) are allowed.\nCheck the cryptmessage for numbers, symbols or tab whitespace and remove them before continuing.", "Error: invalid chars in cryptmessage");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (tb_m.Text.Length % 2 != 0)
|
if (tb_m.Text.Length % 2 != 0)
|
||||||
|
|
Loading…
Reference in New Issue