Пример #1
0
        public void EncyprtedDataWithPasswordDecrypt()
        {
            const string encryptedDataString = "IAAAAG4pxSTP1J4LvdrPEpwmnVtBNfXeOYXreKEuQeMtu8znAFDdm6jl0S1XpDoHHkVWc1IRQH79PnqQYXgeNSCGEGvPrIQXQbtlFotdt3AeWCwKEA==";

            var decryptedTestString = EncryptedDataWithPassword.DecryptData(TestPassword, encryptedDataString);

            Assert.AreEqual(TestString, decryptedTestString);
        }
Пример #2
0
        public void EncryptedDataWithPasswordString()
        {
            var encryptedData       = new EncryptedDataWithPassword(TestString, TestPassword);
            var encryptedDataString = encryptedData.ToString();

            var decryptedTestString = EncryptedDataWithPassword.DecryptData(TestPassword, encryptedDataString);

            Assert.AreEqual(TestString, decryptedTestString);
        }