Ejemplo n.º 1
0
        public void TestInlineValues()
        {
            PasswordSecurity.InitializeAes("Weneee e die Russn kommn!");
            string encrypted = "bladibla".Encrypt();
            var    decrypted = new object().FormatText($"[\"{encrypted}\":decrypt]");

            Assert.AreEqual(decrypted, "bladibla");
        }
Ejemplo n.º 2
0
        public void TestEncryption()
        {
            PasswordSecurity.InitializeAes("So long and thanks for all the fish");
            var initial   = "MeinSuperGutesPasswort";
            var encrypted = PasswordSecurity.Encrypt(initial);
            var decrypted = PasswordSecurity.Decrypt(encrypted);

            Assert.AreEqual(initial, decrypted);
        }