Beispiel #1
0
        public void EncryptWithExistingKeyNewIV()
        {
            using (var aes = new AesWrapper(KeyData))
            {
                var iv = ConvertWrapper.ToHexString(aes.CreateIV());
                Assert.That(!string.IsNullOrEmpty(iv));
                Log.Info("IV: {0}", iv);

                TestEncryption(aes);
            }
        }
Beispiel #2
0
        public void EncryptWithNewKeyIV()
        {
            using (var aes = new AesWrapper())
            {
                var key = ConvertWrapper.ToHexString(aes.CreateKey());
                Assert.That(!string.IsNullOrEmpty(key));
                Log.Info("Key: {0}", key);

                var iv = ConvertWrapper.ToHexString(aes.CreateIV());
                Assert.That(!string.IsNullOrEmpty(iv));
                Log.Info("IV: {0}", iv);

                TestEncryption(aes);
            }
        }