summary refs log tree commit diff
path: root/crypto/src/asn1/DERExternal.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/asn1/DERExternal.cs')
-rw-r--r--crypto/src/asn1/DERExternal.cs25
1 files changed, 8 insertions, 17 deletions
diff --git a/crypto/src/asn1/DERExternal.cs b/crypto/src/asn1/DERExternal.cs
index 7bf35d615..8cb7d040b 100644
--- a/crypto/src/asn1/DERExternal.cs
+++ b/crypto/src/asn1/DERExternal.cs
@@ -153,26 +153,17 @@ namespace Org.BouncyCastle.Asn1
             return new DerSequence(v);
         }
 
-        internal override IAsn1Encoding GetEncoding(int encoding)
-        {
-            return BuildSequence().GetEncodingImplicit(Asn1OutputStream.EncodingDer, Asn1Tags.Universal,
-                Asn1Tags.External);
-        }
+        internal sealed override IAsn1Encoding GetEncoding(int encoding) =>
+            GetEncodingImplicit(encoding, Asn1Tags.Universal, Asn1Tags.External);
 
-        internal override IAsn1Encoding GetEncodingImplicit(int encoding, int tagClass, int tagNo)
-        {
-            return BuildSequence().GetEncodingImplicit(Asn1OutputStream.EncodingDer, tagClass, tagNo);
-        }
+        internal override IAsn1Encoding GetEncodingImplicit(int encoding, int tagClass, int tagNo) =>
+            BuildSequence().GetEncodingImplicit(Asn1OutputStream.EncodingDer, tagClass, tagNo);
 
-        internal sealed override DerEncoding GetEncodingDer()
-        {
-            return BuildSequence().GetEncodingDerImplicit(Asn1Tags.Universal, Asn1Tags.External);
-        }
+        internal sealed override DerEncoding GetEncodingDer() =>
+            GetEncodingDerImplicit(Asn1Tags.Universal, Asn1Tags.External);
 
-        internal sealed override DerEncoding GetEncodingDerImplicit(int tagClass, int tagNo)
-        {
-            return BuildSequence().GetEncodingDerImplicit(tagClass, tagNo);
-        }
+        internal sealed override DerEncoding GetEncodingDerImplicit(int tagClass, int tagNo) =>
+            BuildSequence().GetEncodingDerImplicit(tagClass, tagNo);
 
         protected override int Asn1GetHashCode()
 		{