Пример #1
0
        public void DecryptStringUsingRijndael()
        {
            string s = null;

            CryptService crip = new CryptService(CryptProvider.Rijndael);
            crip.Key = key2;

            s = crip.Decrypt("9p4GFRFMviNj2EofPB2hRZcbgrgi3SrJddPsxw2ukcxHx7b3TZUJO6t+0oEVaLOI");

            Assert.AreEqual("Exemplo de criptografia usando Rijndael.", s);
        }
Пример #2
0
        public void DecryptStringUsingDES()
        {
            string s = null;

            CryptService crip = new CryptService(CryptProvider.DES);
            crip.Key = key1;

            s = crip.Decrypt("XY0tce7dmMFhL31KjdPazmyWK6lA8Ueecj3NjzfJ+HRdTci8+n1yGg==");

            Assert.AreEqual("Exemplo de criptografia usando DES.", s);
        }