Пример #1
0
    public void TestAes()
    {
        AESCode aes = new AESCode();

        aes.Key = "123456789";
        string words  = "zxczxczxczxczxczxczxczxcxzczxczxczx";
        string result = aes.Encrypt(words);

        Debug.Log("Encrypt =>" + result);
        string rr = aes.Decrypt(result);

        Debug.Log("Decrypt =>" + rr);
    }
Пример #2
0
        public void TestAes()
        {
            AESCode aes = new AESCode();

            aes.Key = "123456789";

            string encode = aes.Encrypt(aes.Key);

            Debug.Log("Encrypt =>" + encode);
            string decode = aes.Decrypt(encode);

            Debug.Log("Decrypt =>" + decode);

            Assert.AreEqual(aes.Key, decode);
            encode = aes.Encrypt(aes.Key);
            Debug.Log("Encrypt =>" + encode);
            decode = aes.Decrypt(encode);
            Debug.Log("Decrypt =>" + decode);
        }