KeepassLib version update to 2.38

This commit is contained in:
BONNEVILLE Geoffroy
2018-03-09 17:49:47 +01:00
parent fc25d7ea93
commit 49637fcc3b
100 changed files with 556 additions and 278 deletions

View File

@@ -1,6 +1,6 @@
/*
KeePass Password Safe - The Open-Source Password Manager
Copyright (C) 2003-2017 Dominik Reichl <dominik.reichl@t-online.de>
Copyright (C) 2003-2018 Dominik Reichl <dominik.reichl@t-online.de>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -822,6 +822,21 @@ namespace ModernKeePassLib.Cryptography
throw new Exception("MemUtil-9");
if(MemUtil.BytesToInt32(pbRes) != i)
throw new Exception("MemUtil-10");
ArrayHelperEx<char> ah = MemUtil.ArrayHelperExOfChar;
for(int j = 0; j < 30; ++j)
{
string strA = r.Next(30).ToString();
string strB = r.Next(30).ToString();
char[] vA = strA.ToCharArray();
char[] vB = strB.ToCharArray();
if(ah.Equals(vA, vB) != string.Equals(strA, strB))
throw new Exception("MemUtil-11");
if((vA.Length == vB.Length) && (Math.Sign(ah.Compare(vA, vB)) !=
Math.Sign(string.CompareOrdinal(strA, strB))))
throw new Exception("MemUtil-12");
}
#endif
}