summary refs log tree commit diff
path: root/crypto
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2023-10-24 17:15:33 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2023-10-24 17:15:33 +0700
commit72692ac5cc5353ab151d1281d18ea1d9951292d7 (patch)
tree1601d953cd87e0adc7a8d7ac8f814ee8cbd40241 /crypto
parentRefactoring around X509Name (diff)
downloadBouncyCastle.NET-ed25519-72692ac5cc5353ab151d1281d18ea1d9951292d7.tar.xz
Refactoring in Asn1.X500
Diffstat (limited to 'crypto')
-rw-r--r--crypto/src/asn1/x500/Rdn.cs4
-rw-r--r--crypto/src/asn1/x500/style/IetfUtilities.cs11
2 files changed, 5 insertions, 10 deletions
diff --git a/crypto/src/asn1/x500/Rdn.cs b/crypto/src/asn1/x500/Rdn.cs
index 069a592a5..23537e1ae 100644
--- a/crypto/src/asn1/x500/Rdn.cs
+++ b/crypto/src/asn1/x500/Rdn.cs
@@ -2,9 +2,7 @@
 
 namespace Org.BouncyCastle.Asn1.X500
 {
-    /**
-     * Holding class for a single Relative Distinguished Name (RDN).
-     */
+    /// <summary>Holding class for a single Relative Distinguished Name (RDN).</summary>
     public class Rdn
         : Asn1Encodable
     {
diff --git a/crypto/src/asn1/x500/style/IetfUtilities.cs b/crypto/src/asn1/x500/style/IetfUtilities.cs
index acc1ed72e..dd2996bae 100644
--- a/crypto/src/asn1/x500/style/IetfUtilities.cs
+++ b/crypto/src/asn1/x500/style/IetfUtilities.cs
@@ -89,10 +89,9 @@ namespace Org.BouncyCastle.Asn1.X500.Style
 
             if (buf.Length > 0)
             {
-                int last = buf.Length - 1;
-                while (buf[last] == ' ' && lastEscaped != last)
+                while (buf[buf.Length - 1] == ' ' && lastEscaped != buf.Length - 1)
                 {
-                    buf.Length = last;
+                    buf.Length = buf.Length - 1;
                 }
             }
 
@@ -107,13 +106,11 @@ namespace Org.BouncyCastle.Asn1.X500.Style
         private static int ConvertHex(char c)
         {
             if ('0' <= c && c <= '9')
-            {
                 return c - '0';
-            }
+
             if ('a' <= c && c <= 'f')
-            {
                 return c - 'a' + 10;
-            }
+
             return c - 'A' + 10;
         }