Beispiel #1
0
        public void EncryptionConfig_Render()
        {
            EncryptionConfig config;

            config = EncryptionConfig.Parse("foo:10");
            Assert.AreEqual("foo:10", config.ToString());

            config = EncryptionConfig.Parse("foo:10,20");
            Assert.AreEqual("foo:10,20", config.ToString());
        }
Beispiel #2
0
        public void EncryptionConfig_Parse()
        {
            EncryptionConfig config;

            config = EncryptionConfig.Parse("foo:10");
            Assert.AreEqual("foo", config.Algorithm);
            Assert.AreEqual(1, config.KeySizes.Length);
            Assert.AreEqual(10, config.KeySizes[0]);

            config = EncryptionConfig.Parse("foo:10,20");
            Assert.AreEqual("foo", config.Algorithm);
            Assert.AreEqual(2, config.KeySizes.Length);
            Assert.AreEqual(10, config.KeySizes[0]);
            Assert.AreEqual(20, config.KeySizes[1]);
        }