예제 #1
0
        public void StringCrypt_Converter()
        {
            string str = "LongString with @#$@# stuff in it!?.";

            byte[] input = Encoding.UTF8.GetBytes(str);

            string base64 = StringCrypt.ConvertByteArrayToBase64(input);

            byte[] output = StringCrypt.ConvertBase64ToByteArray(base64);

            Assert.AreEqual(input, output, "The converted back and forth should be identical");
        }