summary refs log tree commit diff
path: root/crypto/src/util
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/util
parentChange namespace for bzip2 code (diff)
downloadBouncyCastle.NET-ed25519-5af9e09a87cc120e2f2da4fadc6b04685f96dda0.tar.xz
Code cleanup
Diffstat (limited to 'crypto/src/util')
-rw-r--r--crypto/src/util/Platform.cs2
-rw-r--r--crypto/src/util/Strings.cs2
-rw-r--r--crypto/src/util/io/pem/PemObject.cs2
-rw-r--r--crypto/src/util/io/pem/PemObjectParser.cs2
-rw-r--r--crypto/src/util/io/pem/PemReader.cs2
-rw-r--r--crypto/src/util/net/IPAddress.cs6
-rw-r--r--crypto/src/util/zlib/Deflate.cs2
-rw-r--r--crypto/src/util/zlib/InfBlocks.cs4
-rw-r--r--crypto/src/util/zlib/JZlib.cs11
-rw-r--r--crypto/src/util/zlib/ZStream.cs2
10 files changed, 18 insertions, 17 deletions
diff --git a/crypto/src/util/Platform.cs b/crypto/src/util/Platform.cs
index 106362d34..cb96adc8b 100644
--- a/crypto/src/util/Platform.cs
+++ b/crypto/src/util/Platform.cs
@@ -18,7 +18,7 @@ namespace Org.BouncyCastle.Utilities
         internal static bool EqualsIgnoreCase(string a, string b)
         {
 #if PORTABLE
-            return String.Equals(a, b, StringComparison.OrdinalIgnoreCase);
+            return string.Equals(a, b, StringComparison.OrdinalIgnoreCase);
 #else
             return ToUpperInvariant(a) == ToUpperInvariant(b);
 #endif
diff --git a/crypto/src/util/Strings.cs b/crypto/src/util/Strings.cs
index 83d1f13fb..1a94d2bff 100644
--- a/crypto/src/util/Strings.cs
+++ b/crypto/src/util/Strings.cs
@@ -24,7 +24,7 @@ namespace Org.BouncyCastle.Utilities
 
             if (changed)
             {
-                return new String(chars);
+                return new string(chars);
             }
 
             return original;
diff --git a/crypto/src/util/io/pem/PemObject.cs b/crypto/src/util/io/pem/PemObject.cs
index 41212f997..fce429f39 100644
--- a/crypto/src/util/io/pem/PemObject.cs
+++ b/crypto/src/util/io/pem/PemObject.cs
@@ -17,7 +17,7 @@ namespace Org.BouncyCastle.Utilities.IO.Pem
 		{
 		}
 
-		public PemObject(String type, IList headers, byte[] content)
+		public PemObject(string type, IList headers, byte[] content)
 		{
 			this.type = type;
             this.headers = Platform.CreateArrayList(headers);
diff --git a/crypto/src/util/io/pem/PemObjectParser.cs b/crypto/src/util/io/pem/PemObjectParser.cs
index 91d26dc3a..928483d2a 100644
--- a/crypto/src/util/io/pem/PemObjectParser.cs
+++ b/crypto/src/util/io/pem/PemObjectParser.cs
@@ -9,7 +9,7 @@ namespace Org.BouncyCastle.Utilities.IO.Pem
 		/// A <see cref="PemObject"/>
 		/// </param>
 		/// <returns>
-		/// A <see cref="System.Object"/>
+		/// An <see cref="object"/>
 		/// </returns>
 		/// <exception cref="IOException"></exception>
 		object ParseObject(PemObject obj);
diff --git a/crypto/src/util/io/pem/PemReader.cs b/crypto/src/util/io/pem/PemReader.cs
index 008a03524..a32ca8181 100644
--- a/crypto/src/util/io/pem/PemReader.cs
+++ b/crypto/src/util/io/pem/PemReader.cs
@@ -292,7 +292,7 @@ namespace Org.BouncyCastle.Utilities.IO.Pem
 		/// <param name="value">expected string</param>
 		/// <returns>false if not consumed</returns>
 
-		private bool expect(String value)
+		private bool expect(string value)
         {
 			for (int t=0; t<value.Length; t++)
             {
diff --git a/crypto/src/util/net/IPAddress.cs b/crypto/src/util/net/IPAddress.cs
index 38c124590..69e8e4680 100644
--- a/crypto/src/util/net/IPAddress.cs
+++ b/crypto/src/util/net/IPAddress.cs
@@ -70,7 +70,7 @@ namespace Org.BouncyCastle.Utilities.Net
 					return false;
 
 				string octetStr = temp.Substring(start, pos - start);
-				int octet = Int32.Parse(octetStr);
+				int octet = int.Parse(octetStr);
 
 				if (octet < 0 || octet > 255)
 					return false;
@@ -106,7 +106,7 @@ namespace Org.BouncyCastle.Utilities.Net
 			string	component,
 			int		size)
 		{
-			int val = Int32.Parse(component);
+			int val = int.Parse(component);
 			try
 			{
 				return val >= 0 && val <= size;
@@ -173,7 +173,7 @@ namespace Org.BouncyCastle.Utilities.Net
 					else
 					{
 						string octetStr = temp.Substring(start, pos - start);
-						int octet = Int32.Parse(octetStr, NumberStyles.AllowHexSpecifier);
+						int octet = int.Parse(octetStr, NumberStyles.AllowHexSpecifier);
 
 						if (octet < 0 || octet > 0xffff)
 							return false;
diff --git a/crypto/src/util/zlib/Deflate.cs b/crypto/src/util/zlib/Deflate.cs
index 90f8eb09c..ccd771eaa 100644
--- a/crypto/src/util/zlib/Deflate.cs
+++ b/crypto/src/util/zlib/Deflate.cs
@@ -82,7 +82,7 @@ namespace Org.BouncyCastle.Utilities.Zlib {
             config_table[9]=new Config(32, 258,  258, 4096, SLOW);
         }
 
-        private static readonly String[] z_errmsg = {
+        private static readonly string[] z_errmsg = {
                                                "need dictionary",     // Z_NEED_DICT       2
                                                "stream end",          // Z_STREAM_END      1
                                                "",                    // Z_OK              0
diff --git a/crypto/src/util/zlib/InfBlocks.cs b/crypto/src/util/zlib/InfBlocks.cs
index 479d9b5c9..9e18e3f60 100644
--- a/crypto/src/util/zlib/InfBlocks.cs
+++ b/crypto/src/util/zlib/InfBlocks.cs
@@ -95,12 +95,12 @@ namespace Org.BouncyCastle.Utilities.Zlib {
         internal int end;             // one byte after sliding window 
         internal int read;            // window read pointer 
         internal int write;           // window write pointer 
-        internal Object checkfn;      // check function 
+        internal object checkfn;      // check function 
         internal long check;          // check on output 
 
         internal InfTree inftree=new InfTree();
 
-        internal InfBlocks(ZStream z, Object checkfn, int w){
+        internal InfBlocks(ZStream z, object checkfn, int w){
             hufts=new int[MANY*3];
             window=new byte[w];
             end=w;
diff --git a/crypto/src/util/zlib/JZlib.cs b/crypto/src/util/zlib/JZlib.cs
index 4f2cfdaa9..d4a9cbf04 100644
--- a/crypto/src/util/zlib/JZlib.cs
+++ b/crypto/src/util/zlib/JZlib.cs
@@ -34,11 +34,12 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  * and contributors of zlib.
  */
 
-namespace Org.BouncyCastle.Utilities.Zlib {
-
-    public sealed class JZlib{
-        private const String _version="1.0.7";
-        public static String version()
+namespace Org.BouncyCastle.Utilities.Zlib
+{
+    public sealed class JZlib
+    {
+        private const string _version="1.0.7";
+        public static string version()
 		{
 			return _version;
 		}
diff --git a/crypto/src/util/zlib/ZStream.cs b/crypto/src/util/zlib/ZStream.cs
index 7ff961462..9378bf78f 100644
--- a/crypto/src/util/zlib/ZStream.cs
+++ b/crypto/src/util/zlib/ZStream.cs
@@ -69,7 +69,7 @@ namespace Org.BouncyCastle.Utilities.Zlib {
         public int avail_out;      // remaining free space at next_out
         public long total_out;     // total nb of bytes output so far
 
-        public String msg;
+        public string msg;
 
         internal Deflate dstate; 
         internal Inflate istate;