summary refs log tree commit diff
path: root/crypto
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2022-09-20 15:21:22 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2022-09-20 15:21:22 +0700
commitb2499e40d81b1ccac9d311de1a045ba2f275c925 (patch)
tree8e7c79c59bc3e65f3afacd5b9a956054d6889f25 /crypto
parentGive IStreamCalculator a generic type (diff)
downloadBouncyCastle.NET-ed25519-b2499e40d81b1ccac9d311de1a045ba2f275c925.tar.xz
Cleanup
Diffstat (limited to 'crypto')
-rw-r--r--crypto/src/crypto/IWrapper.cs4
-rw-r--r--crypto/src/crypto/Security.cs8
-rw-r--r--crypto/src/crypto/modes/GCMBlockCipher.cs7
-rw-r--r--crypto/src/openpgp/PgpSignature.cs2
-rw-r--r--crypto/src/openpgp/PgpV3SignatureGenerator.cs3
-rw-r--r--crypto/src/tls/DtlsReliableHandshake.cs1
-rw-r--r--crypto/test/src/tsp/test/TimeStampTokenInfoTest.cs2
7 files changed, 7 insertions, 20 deletions
diff --git a/crypto/src/crypto/IWrapper.cs b/crypto/src/crypto/IWrapper.cs

index 58202b302..ffeddf3a9 100644 --- a/crypto/src/crypto/IWrapper.cs +++ b/crypto/src/crypto/IWrapper.cs
@@ -1,7 +1,3 @@ -using System; - -using Org.BouncyCastle.Security; - namespace Org.BouncyCastle.Crypto { public interface IWrapper diff --git a/crypto/src/crypto/Security.cs b/crypto/src/crypto/Security.cs
index 1e82e75b0..7eb595f8e 100644 --- a/crypto/src/crypto/Security.cs +++ b/crypto/src/crypto/Security.cs
@@ -1,7 +1,5 @@ -using System; -using System.Text; +using System.Text; -using Org.BouncyCastle.Crypto; using Org.BouncyCastle.Crypto.Digests; using Org.BouncyCastle.Crypto.Engines; using Org.BouncyCastle.Crypto.Generators; @@ -11,9 +9,9 @@ using Org.BouncyCastle.Crypto.Parameters; using Org.BouncyCastle.Security; using Org.BouncyCastle.Utilities.Encoders; -namespace crypto +namespace Org.BouncyCastle.Crypto { - public class Security + public static class Security { // USAGE //var key = Security.GenerateText(32); diff --git a/crypto/src/crypto/modes/GCMBlockCipher.cs b/crypto/src/crypto/modes/GCMBlockCipher.cs
index c19f5f904..2255b6276 100644 --- a/crypto/src/crypto/modes/GCMBlockCipher.cs +++ b/crypto/src/crypto/modes/GCMBlockCipher.cs
@@ -15,8 +15,7 @@ using Org.BouncyCastle.Utilities; namespace Org.BouncyCastle.Crypto.Modes { /// <summary> - /// Implements the Galois/Counter mode (GCM) detailed in - /// NIST Special Publication 800-38D. + /// Implements the Galois/Counter mode (GCM) detailed in NIST Special Publication 800-38D. /// </summary> public sealed class GcmBlockCipher : IAeadBlockCipher @@ -25,7 +24,7 @@ namespace Org.BouncyCastle.Crypto.Modes { #if NETCOREAPP3_0_OR_GREATER // TODO Prefer more tightly coupled test - if (System.Runtime.Intrinsics.X86.Pclmulqdq.IsSupported) + if (Pclmulqdq.IsSupported) { return new BasicGcmMultiplier(); } @@ -106,7 +105,7 @@ namespace Org.BouncyCastle.Crypto.Modes this.initialised = true; KeyParameter keyParam; - byte[] newNonce = null; + byte[] newNonce; if (parameters is AeadParameters) { diff --git a/crypto/src/openpgp/PgpSignature.cs b/crypto/src/openpgp/PgpSignature.cs
index aabe964b1..da00d43eb 100644 --- a/crypto/src/openpgp/PgpSignature.cs +++ b/crypto/src/openpgp/PgpSignature.cs
@@ -1,7 +1,7 @@ using System; using System.IO; -using Org.BouncyCastle.Asn1; +using Org.BouncyCastle.Asn1; using Org.BouncyCastle.Crypto; using Org.BouncyCastle.Security; using Org.BouncyCastle.Utilities; diff --git a/crypto/src/openpgp/PgpV3SignatureGenerator.cs b/crypto/src/openpgp/PgpV3SignatureGenerator.cs
index fc8b42df2..c7113e0ae 100644 --- a/crypto/src/openpgp/PgpV3SignatureGenerator.cs +++ b/crypto/src/openpgp/PgpV3SignatureGenerator.cs
@@ -1,8 +1,5 @@ -using System; - using Org.BouncyCastle.Crypto; using Org.BouncyCastle.Crypto.Parameters; -using Org.BouncyCastle.Math; using Org.BouncyCastle.Security; using Org.BouncyCastle.Utilities.Date; diff --git a/crypto/src/tls/DtlsReliableHandshake.cs b/crypto/src/tls/DtlsReliableHandshake.cs
index 32c5c7851..8d6eb7b84 100644 --- a/crypto/src/tls/DtlsReliableHandshake.cs +++ b/crypto/src/tls/DtlsReliableHandshake.cs
@@ -2,7 +2,6 @@ using System.Collections.Generic; using System.IO; -using Org.BouncyCastle.Utilities; using Org.BouncyCastle.Utilities.Date; namespace Org.BouncyCastle.Tls diff --git a/crypto/test/src/tsp/test/TimeStampTokenInfoTest.cs b/crypto/test/src/tsp/test/TimeStampTokenInfoTest.cs
index ea7f2c4dc..a1a7355e5 100644 --- a/crypto/test/src/tsp/test/TimeStampTokenInfoTest.cs +++ b/crypto/test/src/tsp/test/TimeStampTokenInfoTest.cs
@@ -1,5 +1,3 @@ -using System; - using NUnit.Framework; using Org.BouncyCastle.Asn1;