From c72c3bc4be65099c30fc813693216d124a30308b Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Sat, 25 Jan 2014 10:37:54 +0700 Subject: Use AesEngine by default --- crypto/src/crypto/tls/DefaultTlsCipherFactory.cs | 11 ++++++++--- 1 file 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(); + } + /// protected virtual IDigest CreateDigest(DigestAlgorithm digestAlgorithm) { -- cgit 1.4.1