summary refs log tree commit diff
path: root/crypto/src/asn1
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@gmail.com>2022-06-22 22:08:13 +0700
committerPeter Dettman <peter.dettman@gmail.com>2022-06-22 22:08:13 +0700
commit5af9e09a87cc120e2f2da4fadc6b04685f96dda0 (patch)
tree9647961b98f60c9706ab8491e73070759d4a3545 /crypto/src/asn1
parentChange namespace for bzip2 code (diff)
downloadBouncyCastle.NET-ed25519-5af9e09a87cc120e2f2da4fadc6b04685f96dda0.tar.xz
Code cleanup
Diffstat (limited to 'crypto/src/asn1')
-rw-r--r--crypto/src/asn1/Asn1RelativeOid.cs4
-rw-r--r--crypto/src/asn1/Asn1TaggedObject.cs2
-rw-r--r--crypto/src/asn1/DerObjectIdentifier.cs6
-rw-r--r--crypto/src/asn1/nist/KMACwithSHAKE256_params.cs2
-rw-r--r--crypto/src/asn1/x509/GeneralName.cs12
-rw-r--r--crypto/src/asn1/x9/X9ECParameters.cs2
6 files changed, 14 insertions, 14 deletions
diff --git a/crypto/src/asn1/Asn1RelativeOid.cs b/crypto/src/asn1/Asn1RelativeOid.cs
index 9c4f917f2..d3c031913 100644
--- a/crypto/src/asn1/Asn1RelativeOid.cs
+++ b/crypto/src/asn1/Asn1RelativeOid.cs
@@ -59,7 +59,7 @@ namespace Org.BouncyCastle.Asn1
             return (Asn1RelativeOid)Meta.Instance.GetContextInstance(taggedObject, declaredExplicit);
         }
 
-        private const long LongLimit = (Int64.MaxValue >> 7) - 0x7F;
+        private const long LongLimit = (long.MaxValue >> 7) - 0x7F;
 
         private readonly string identifier;
         private byte[] contents;
@@ -133,7 +133,7 @@ namespace Org.BouncyCastle.Asn1
                 string token = tok.NextToken();
                 if (token.Length <= 18)
                 {
-                    WriteField(bOut, Int64.Parse(token));
+                    WriteField(bOut, long.Parse(token));
                 }
                 else
                 {
diff --git a/crypto/src/asn1/Asn1TaggedObject.cs b/crypto/src/asn1/Asn1TaggedObject.cs
index 82fe0913c..cba199fb3 100644
--- a/crypto/src/asn1/Asn1TaggedObject.cs
+++ b/crypto/src/asn1/Asn1TaggedObject.cs
@@ -59,7 +59,7 @@ namespace Org.BouncyCastle.Asn1
             return taggedObject;
         }
 
-        public static Asn1TaggedObject GetInstance(Object obj, int tagClass, int tagNo)
+        public static Asn1TaggedObject GetInstance(object obj, int tagClass, int tagNo)
         {
             if (obj == null)
                 throw new ArgumentNullException(nameof(obj));
diff --git a/crypto/src/asn1/DerObjectIdentifier.cs b/crypto/src/asn1/DerObjectIdentifier.cs
index 8b77f966c..b10f8f8b6 100644
--- a/crypto/src/asn1/DerObjectIdentifier.cs
+++ b/crypto/src/asn1/DerObjectIdentifier.cs
@@ -76,7 +76,7 @@ namespace Org.BouncyCastle.Asn1
             return (DerObjectIdentifier)Meta.Instance.GetContextInstance(taggedObject, declaredExplicit);
         }
 
-        private const long LongLimit = (Int64.MaxValue >> 7) - 0x7F;
+        private const long LongLimit = (long.MaxValue >> 7) - 0x7F;
 
         private static readonly DerObjectIdentifier[] cache = new DerObjectIdentifier[1024];
 
@@ -165,7 +165,7 @@ namespace Org.BouncyCastle.Asn1
             token = tok.NextToken();
             if (token.Length <= 18)
             {
-                Asn1RelativeOid.WriteField(bOut, first + Int64.Parse(token));
+                Asn1RelativeOid.WriteField(bOut, first + long.Parse(token));
             }
             else
             {
@@ -177,7 +177,7 @@ namespace Org.BouncyCastle.Asn1
                 token = tok.NextToken();
                 if (token.Length <= 18)
                 {
-                    Asn1RelativeOid.WriteField(bOut, Int64.Parse(token));
+                    Asn1RelativeOid.WriteField(bOut, long.Parse(token));
                 }
                 else
                 {
diff --git a/crypto/src/asn1/nist/KMACwithSHAKE256_params.cs b/crypto/src/asn1/nist/KMACwithSHAKE256_params.cs
index fa7471913..f0560e9da 100644
--- a/crypto/src/asn1/nist/KMACwithSHAKE256_params.cs
+++ b/crypto/src/asn1/nist/KMACwithSHAKE256_params.cs
@@ -29,7 +29,7 @@ public class KMacWithShake256Params : Asn1Encodable
         this.customizationString = Arrays.Clone(customizationString);
     }
 
-    public static KMacWithShake256Params GetInstance(Object o)
+    public static KMacWithShake256Params GetInstance(object o)
     {
         if (o is KMacWithShake256Params)
         {
diff --git a/crypto/src/asn1/x509/GeneralName.cs b/crypto/src/asn1/x509/GeneralName.cs
index fe00323ee..7b65e3239 100644
--- a/crypto/src/asn1/x509/GeneralName.cs
+++ b/crypto/src/asn1/x509/GeneralName.cs
@@ -319,7 +319,7 @@ namespace Org.BouncyCastle.Asn1.X509
 
 		private void parseIPv4Mask(string mask, byte[] addr, int offset)
 		{
-			int maskVal = Int32.Parse(mask);
+			int maskVal = int.Parse(mask);
 
 			for (int i = 0; i != maskVal; i++)
 			{
@@ -331,14 +331,14 @@ namespace Org.BouncyCastle.Asn1.X509
 		{
 			foreach (string token in ip.Split('.', '/'))
 			{
-				addr[offset++] = (byte)Int32.Parse(token);
+				addr[offset++] = (byte)int.Parse(token);
 			}
 		}
 
 		private int[] parseMask(string mask)
 		{
 			int[] res = new int[8];
-			int   maskVal = Int32.Parse(mask);
+			int maskVal = int.Parse(mask);
 
 			for (int i = 0; i != maskVal; i++)
 			{
@@ -387,14 +387,14 @@ namespace Org.BouncyCastle.Asn1.X509
 				{
 					if (e.IndexOf('.') < 0)
 					{
-						val[index++] = Int32.Parse(e, NumberStyles.AllowHexSpecifier);
+						val[index++] = int.Parse(e, NumberStyles.AllowHexSpecifier);
 					}
 					else
 					{
 						string[] tokens = e.Split('.');
 
-						val[index++] = (Int32.Parse(tokens[0]) << 8) | Int32.Parse(tokens[1]);
-						val[index++] = (Int32.Parse(tokens[2]) << 8) | Int32.Parse(tokens[3]);
+						val[index++] = (int.Parse(tokens[0]) << 8) | int.Parse(tokens[1]);
+						val[index++] = (int.Parse(tokens[2]) << 8) | int.Parse(tokens[3]);
 					}
 				}
 			}
diff --git a/crypto/src/asn1/x9/X9ECParameters.cs b/crypto/src/asn1/x9/X9ECParameters.cs
index c484fc62d..077f74ce4 100644
--- a/crypto/src/asn1/x9/X9ECParameters.cs
+++ b/crypto/src/asn1/x9/X9ECParameters.cs
@@ -20,7 +20,7 @@ namespace Org.BouncyCastle.Asn1.X9
         private BigInteger	h;
         private byte[]		seed;
 
-		public static X9ECParameters GetInstance(Object obj)
+		public static X9ECParameters GetInstance(object obj)
 		{
 			if (obj is X9ECParameters)
 				return (X9ECParameters)obj;