From 9f89a0844dc9d946ffd7d8b853aa248f407a81ed Mon Sep 17 00:00:00 2001 From: Adam Hathcock Date: Sun, 6 May 2018 09:09:45 +0100 Subject: [PATCH 1/2] Fix namespaces to not interfere with bouncy castle users --- src/SharpCompress/Common/Rar/RarRijndael.cs | 2 -- src/SharpCompress/Crypto/CryptoException.cs | 2 +- src/SharpCompress/Crypto/DataLengthException.cs | 2 +- src/SharpCompress/Crypto/IBlockCipher.cs | 2 +- src/SharpCompress/Crypto/ICipherParameters.cs | 2 +- src/SharpCompress/Crypto/KeyParameter.cs | 2 +- src/SharpCompress/Crypto/RijndaelEngine.cs | 3 +-- 7 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/SharpCompress/Common/Rar/RarRijndael.cs b/src/SharpCompress/Common/Rar/RarRijndael.cs index 83fd4958..69e4e0fc 100644 --- a/src/SharpCompress/Common/Rar/RarRijndael.cs +++ b/src/SharpCompress/Common/Rar/RarRijndael.cs @@ -4,8 +4,6 @@ using System.Collections.Generic; using System.Linq; using System.Security.Cryptography; using System.Text; -using Org.BouncyCastle.Crypto.Engines; -using Org.BouncyCastle.Crypto.Parameters; namespace SharpCompress.Common.Rar { diff --git a/src/SharpCompress/Crypto/CryptoException.cs b/src/SharpCompress/Crypto/CryptoException.cs index 7eb42a74..6e8b9f14 100644 --- a/src/SharpCompress/Crypto/CryptoException.cs +++ b/src/SharpCompress/Crypto/CryptoException.cs @@ -1,6 +1,6 @@ using System; -namespace Org.BouncyCastle.Crypto +namespace SharpCompress.Crypto { public class CryptoException : Exception diff --git a/src/SharpCompress/Crypto/DataLengthException.cs b/src/SharpCompress/Crypto/DataLengthException.cs index 8a3e1c47..b82a9e9c 100644 --- a/src/SharpCompress/Crypto/DataLengthException.cs +++ b/src/SharpCompress/Crypto/DataLengthException.cs @@ -1,6 +1,6 @@ using System; -namespace Org.BouncyCastle.Crypto +namespace SharpCompress.Crypto { public class DataLengthException : CryptoException diff --git a/src/SharpCompress/Crypto/IBlockCipher.cs b/src/SharpCompress/Crypto/IBlockCipher.cs index a4f30012..6f6542e3 100644 --- a/src/SharpCompress/Crypto/IBlockCipher.cs +++ b/src/SharpCompress/Crypto/IBlockCipher.cs @@ -1,4 +1,4 @@ -namespace Org.BouncyCastle.Crypto +namespace SharpCompress.Crypto { /// Base interface for a symmetric key block cipher. public interface IBlockCipher diff --git a/src/SharpCompress/Crypto/ICipherParameters.cs b/src/SharpCompress/Crypto/ICipherParameters.cs index 16439a25..d6e4af8b 100644 --- a/src/SharpCompress/Crypto/ICipherParameters.cs +++ b/src/SharpCompress/Crypto/ICipherParameters.cs @@ -1,4 +1,4 @@ -namespace Org.BouncyCastle.Crypto +namespace SharpCompress.Crypto { public interface ICipherParameters { diff --git a/src/SharpCompress/Crypto/KeyParameter.cs b/src/SharpCompress/Crypto/KeyParameter.cs index b69ce4e1..8658fc9c 100644 --- a/src/SharpCompress/Crypto/KeyParameter.cs +++ b/src/SharpCompress/Crypto/KeyParameter.cs @@ -1,6 +1,6 @@ using System; -namespace Org.BouncyCastle.Crypto.Parameters +namespace SharpCompress.Crypto { public class KeyParameter : ICipherParameters diff --git a/src/SharpCompress/Crypto/RijndaelEngine.cs b/src/SharpCompress/Crypto/RijndaelEngine.cs index f90be37f..06e2bbdd 100644 --- a/src/SharpCompress/Crypto/RijndaelEngine.cs +++ b/src/SharpCompress/Crypto/RijndaelEngine.cs @@ -1,7 +1,6 @@ using System; -using Org.BouncyCastle.Crypto.Parameters; -namespace Org.BouncyCastle.Crypto.Engines +namespace SharpCompress.Crypto { public class RijndaelEngine : IBlockCipher From 747180203cca3f7251525933378a59124c0a5861 Mon Sep 17 00:00:00 2001 From: Adam Hathcock Date: Sun, 6 May 2018 09:12:18 +0100 Subject: [PATCH 2/2] =?UTF-8?q?Rider=20isn=E2=80=99t=20quite=20good=20enou?= =?UTF-8?q?gh=20in=20refactoring?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/SharpCompress/Common/Rar/RarRijndael.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/SharpCompress/Common/Rar/RarRijndael.cs b/src/SharpCompress/Common/Rar/RarRijndael.cs index 69e4e0fc..824cb64e 100644 --- a/src/SharpCompress/Common/Rar/RarRijndael.cs +++ b/src/SharpCompress/Common/Rar/RarRijndael.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using System.Linq; using System.Security.Cryptography; using System.Text; +using SharpCompress.Crypto; namespace SharpCompress.Common.Rar {