Пример #1
0
        public void TestAllText()
        {
            var    temp     = Path.GetTempFileName();
            string password = "******";
            var    expect   = "The quick brown fox jumps over the lazy dog. 1234567890";

            AES128File.WriteAllText(temp, expect, password);
            var text = AES128File.ReadAllText(temp, password);

            Assert.AreEqual(expect, text);
        }
Пример #2
0
        public void TestAllText()
        {
            var temp = Path.GetTempFileName();

            byte[] key    = Encoding.UTF8.GetBytes("ABCDEFGHIJKLMNOP");
            var    expect = "The quick brown fox jumps over the lazy dog. 1234567890";

            AES128File.WriteAllText(temp, expect, key);
            var text = AES128File.ReadAllText(temp, key);

            Assert.AreEqual(expect, text);
        }