using SwanCSharp.Encryption;
using System;
using System.Collections.Generic;
using System.Text;

namespace Encrypt
{
    class Program
    {
        static void Main(string[] args)
        {
            AES lobjAES = new AES("ourpassphrase", "oursaltvalue", HashFunction.SHA1, 2, "2hs@3TY9F4fz5%tv", KeySize.Key256);

            string lstrEncrypted = lobjAES.StringEncrypt("Test of Encryption");
            Console.WriteLine("Encrypted Text: " + lstrEncrypted);
            string lstrDecryptedText ="";
            Boolean lblnResult = lobjAES.StringDecrypt(lstrEncrypted, out lstrDecryptedText);

            if (lblnResult)
            {
                Console.WriteLine("Decrypted Text: " + lstrDecryptedText);
            }
            else
            {
                Console.WriteLine("Decryption failed");
            }

            // Encrypt File
            Boolean lblnResult2 = lobjAES.FileEncrypt("FileToEncrypt.txt", "", "FileEncrypted.txt", "", true);

            // Decrypt File
            lblnResult2 = lobjAES.FileDecrypt("FileEncrypted.txt", "", "FileDecrypted.txt", "", true);
        }
    }
}
