summary refs log tree commit diff
path: root/crypto/src/math
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/math
parentChange namespace for bzip2 code (diff)
downloadBouncyCastle.NET-ed25519-5af9e09a87cc120e2f2da4fadc6b04685f96dda0.tar.xz
Code cleanup
Diffstat (limited to 'crypto/src/math')
-rw-r--r--crypto/src/math/BigInteger.cs10
-rw-r--r--crypto/src/math/ec/ECCurve.cs4
-rw-r--r--crypto/src/math/ec/custom/sec/SecT571FieldElement.cs2
3 files changed, 8 insertions, 8 deletions
diff --git a/crypto/src/math/BigInteger.cs b/crypto/src/math/BigInteger.cs
index 96d74870d..c6e760db9 100644
--- a/crypto/src/math/BigInteger.cs
+++ b/crypto/src/math/BigInteger.cs
@@ -188,7 +188,7 @@ namespace Org.BouncyCastle.Math
          * They are calculated according to the expected savings in multiplications.
          * Some squares will also be saved on average, but we offset these against the extra storage costs.
          */
-        private static readonly int[] ExpWindowThresholds = { 7, 25, 81, 241, 673, 1793, 4609, Int32.MaxValue };
+        private static readonly int[] ExpWindowThresholds = { 7, 25, 81, 241, 673, 1793, 4609, int.MaxValue };
 
         private const int BitsPerByte = 8;
         private const int BitsPerInt = 32;
@@ -361,7 +361,7 @@ namespace Org.BouncyCastle.Math
             }
 
             // strip leading zeros from the string str
-            while (index < str.Length && Int32.Parse(str[index].ToString(), style) == 0)
+            while (index < str.Length && int.Parse(str[index].ToString(), style) == 0)
             {
                 index++;
             }
@@ -473,7 +473,7 @@ namespace Org.BouncyCastle.Math
 //            {
 //				char c = value[index];
 //				string s = c.ToString();
-//				int i = Int32.Parse(s, style);
+//				int i = int.Parse(s, style);
 //
 //                b = b.Multiply(r).Add(ValueOf(i));
 //                index++;
@@ -2570,7 +2570,7 @@ namespace Org.BouncyCastle.Math
             if (QuickPow2Check())
             {
                 long powOf2 = (long)exp * (BitLength - 1);
-                if (powOf2 > Int32.MaxValue)
+                if (powOf2 > int.MaxValue)
                 {
                     throw new ArithmeticException("Result too large");
                 }
@@ -2788,7 +2788,7 @@ namespace Org.BouncyCastle.Math
             int excessBits = (numWords << 5) - n;
             if (excessBits > 0)
             {
-                result[0] &= (int)(UInt32.MaxValue >> excessBits);
+                result[0] &= (int)(uint.MaxValue >> excessBits);
             }
 
             return result;
diff --git a/crypto/src/math/ec/ECCurve.cs b/crypto/src/math/ec/ECCurve.cs
index 52d634cd2..838e407e3 100644
--- a/crypto/src/math/ec/ECCurve.cs
+++ b/crypto/src/math/ec/ECCurve.cs
@@ -843,14 +843,14 @@ namespace Org.BouncyCastle.Math.EC
 
         int AsInteger(string envVariable, int defaultValue)
         {
-            String v = Platform.GetEnvironmentVariable(envVariable);
+            string v = Platform.GetEnvironmentVariable(envVariable);
 
             if (v == null)
             {
                 return defaultValue;
             }
 
-            return Int32.Parse(v);
+            return int.Parse(v);
         }
     }
 
diff --git a/crypto/src/math/ec/custom/sec/SecT571FieldElement.cs b/crypto/src/math/ec/custom/sec/SecT571FieldElement.cs
index 22edfe0a2..b9c581860 100644
--- a/crypto/src/math/ec/custom/sec/SecT571FieldElement.cs
+++ b/crypto/src/math/ec/custom/sec/SecT571FieldElement.cs
@@ -48,7 +48,7 @@ namespace Org.BouncyCastle.Math.EC.Custom.Sec
             return Nat576.ToBigInteger64(x);
         }
 
-        public override String FieldName
+        public override string FieldName
         {
             get { return "SecT571Field"; }
         }