summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2014-01-25 10:37:54 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2014-01-25 10:37:54 +0700
commitc72c3bc4be65099c30fc813693216d124a30308b (patch)
tree4e068960eb043df849b95796112dded04dc8c497
parentFormatting (diff)
downloadBouncyCastle.NET-ed25519-c72c3bc4be65099c30fc813693216d124a30308b.tar.xz
Use AesEngine by default
-rw-r--r--crypto/src/crypto/tls/DefaultTlsCipherFactory.cs11
1 files changed, 8 insertions, 3 deletions
diff --git a/crypto/src/crypto/tls/DefaultTlsCipherFactory.cs b/crypto/src/crypto/tls/DefaultTlsCipherFactory.cs
index 9b6e2c14c..18b23a67b 100644
--- a/crypto/src/crypto/tls/DefaultTlsCipherFactory.cs
+++ b/crypto/src/crypto/tls/DefaultTlsCipherFactory.cs
@@ -50,14 +50,14 @@ namespace Org.BouncyCastle.Crypto.Tls
                 CreateDigest(digestAlgorithm), CreateDigest(digestAlgorithm), cipherKeySize);
         }
 
-        protected virtual IStreamCipher CreateRC4StreamCipher()
+        protected virtual IBlockCipher CreateAesEngine()
         {
-            return new RC4Engine();
+            return new AesEngine();
         }
 
         protected virtual IBlockCipher CreateAesBlockCipher()
         {
-            return new CbcBlockCipher(new AesFastEngine());
+            return new CbcBlockCipher(CreateAesEngine());
         }
 
         protected virtual IBlockCipher CreateDesEdeBlockCipher()
@@ -65,6 +65,11 @@ namespace Org.BouncyCastle.Crypto.Tls
             return new CbcBlockCipher(new DesEdeEngine());
         }
 
+        protected virtual IStreamCipher CreateRC4StreamCipher()
+        {
+            return new RC4Engine();
+        }
+
         /// <exception cref="IOException"></exception>
         protected virtual IDigest CreateDigest(DigestAlgorithm digestAlgorithm)
         {