public TestSymmetricKeyProvider() { byte[] key; byte[] iv; using (var provider = new AesCryptoServiceProvider()) { provider.GenerateIV(); provider.GenerateKey(); key = provider.Key; iv = provider.IV; provider.Clear(); } _key = new TestSymmetricKey(key, iv); }