Пример #1
0
        public void TestLinesEncoding()
        {
            var    temp     = Path.GetTempFileName();
            string password = "******";
            var    expect   = GetStringList();

            AES128File.WriteLines(temp, expect, Encoding.Unicode, password);

            var list = AES128File.ReadLines(temp, Encoding.Unicode, password);

            Assert.IsTrue(expect.SequenceEqual(list));
        }
Пример #2
0
        public void TestLinesEncoding()
        {
            var temp = Path.GetTempFileName();

            byte[] key    = Encoding.UTF8.GetBytes("ABCDEFGHIJKLMNOP");
            var    expect = GetStringList();

            AES128File.WriteLines(temp, expect, Encoding.Unicode, key);

            var list = AES128File.ReadLines(temp, Encoding.Unicode, key);

            Assert.IsTrue(expect.SequenceEqual(list));
        }