support for Keyfiles like in Keepass 2.47

This commit is contained in:
Philipp Crocoll
2021-01-12 07:31:18 +01:00
parent 533021da3f
commit d9bcac600c
5 changed files with 637 additions and 40 deletions

View File

@@ -1734,5 +1734,24 @@ namespace KeePassLib.Utility
// behavior of Notepad (on Windows 10)
return str.Replace('\0', ' ');
}
internal static string RemoveWhiteSpace(string str)
{
if (str == null) { Debug.Assert(false); return string.Empty; }
int cc = str.Length;
if (cc == 0) return string.Empty;
StringBuilder sb = new StringBuilder();
for (int i = 0; i < cc; ++i)
{
char ch = str[i];
if (char.IsWhiteSpace(ch)) continue;
sb.Append(ch);
}
return sb.ToString();
}
}
}