Changed test project type to WIndows 8.1

Changed test project framework from Nunit to MSTest
Changed HashAlgorithm from BouncyCastle to WinRT crypto
WIP progress bar in opendatabaseusercontrol
TextBox with button made generic
WIP implement copy on button click in Entry Page
This commit is contained in:
2017-11-06 19:01:01 +01:00
committed by BONNEVILLE Geoffroy
parent 53a54252e3
commit 8e690747e2
85 changed files with 2836 additions and 672 deletions

View File

@@ -1,33 +1,29 @@
using NUnit.Framework;
using System;
#if KeePassLib
using KeePassLib.Keys;
#else
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using ModernKeePassLib.Keys;
#endif
using ModernKeePassLib.Utility;
namespace ModernKeePassLib.Test.Keys
{
[TestFixture ()]
public class KcpPasswordTests
{
const string testPassword = "password";
[Test ()]
public void TestConstruct ()
[TestClass()]
public class KcpPasswordTests
{
var expectedHash = new byte[32] {
0x5E, 0x88, 0x48, 0x98, 0xDA, 0x28, 0x04, 0x71,
0x51, 0xD0, 0xE5, 0x6F, 0x8D, 0xC6, 0x29, 0x27,
0x73, 0x60, 0x3D, 0x0D, 0x6A, 0xAB, 0xBD, 0xD6,
0x2A, 0x11, 0xEF, 0x72, 0x1D, 0x15, 0x42, 0xD8
};
const string testPassword = "password";
var key = new KcpPassword (testPassword);
var keyData = key.KeyData.ReadData ();
Assert.That (keyData, Is.EqualTo (expectedHash));
[TestMethod]
public void TestConstruct()
{
var expectedHash = new byte[32]
{
0x5E, 0x88, 0x48, 0x98, 0xDA, 0x28, 0x04, 0x71,
0x51, 0xD0, 0xE5, 0x6F, 0x8D, 0xC6, 0x29, 0x27,
0x73, 0x60, 0x3D, 0x0D, 0x6A, 0xAB, 0xBD, 0xD6,
0x2A, 0x11, 0xEF, 0x72, 0x1D, 0x15, 0x42, 0xD8
};
var key = new KcpPassword(testPassword);
var keyData = key.KeyData.ReadData();
Assert.IsTrue(MemUtil.ArraysEqual(keyData, expectedHash));
}
}
}
}