public void TestAllLinesEncoding() { var temp = Path.GetTempFileName(); string password = "******"; var expect = GetStringList().ToArray(); AES128File.WriteAllLines(temp, expect, Encoding.Unicode, password); var list = AES128File.ReadAllLines(temp, Encoding.Unicode, password); Assert.IsTrue(expect.SequenceEqual(list)); }
public void TestAllLinesEncoding() { var temp = Path.GetTempFileName(); byte[] key = Encoding.UTF8.GetBytes("ABCDEFGHIJKLMNOP"); var expect = GetStringList().ToArray(); AES128File.WriteAllLines(temp, expect, Encoding.Unicode, key); var list = AES128File.ReadAllLines(temp, Encoding.Unicode, key); Assert.IsTrue(expect.SequenceEqual(list)); }