summary refs log tree commit diff
path: root/crypto/src/asn1/DerSequence.cs
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2021-11-08 01:51:32 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2021-11-08 01:51:32 +0700
commit58a813a047df69785ce1180b2bcfb71d4d3c0180 (patch)
treee0b7d2e63fdc7dceb967744853ea610b6fdc9abc /crypto/src/asn1/DerSequence.cs
parentRemove unnecessary static references (diff)
downloadBouncyCastle.NET-ed25519-58a813a047df69785ce1180b2bcfb71d4d3c0180.tar.xz
Utility methods and guards
Diffstat (limited to 'crypto/src/asn1/DerSequence.cs')
-rw-r--r--crypto/src/asn1/DerSequence.cs11
1 files changed, 10 insertions, 1 deletions
diff --git a/crypto/src/asn1/DerSequence.cs b/crypto/src/asn1/DerSequence.cs
index d703cd0f5..5b315a909 100644
--- a/crypto/src/asn1/DerSequence.cs
+++ b/crypto/src/asn1/DerSequence.cs
@@ -1,5 +1,4 @@
 using System;
-using System.Collections;
 using System.IO;
 
 using Org.BouncyCastle.Utilities;
@@ -90,9 +89,19 @@ namespace Org.BouncyCastle.Asn1
             Platform.Dispose(dOut);
         }
 
+        internal override DerBitString ToAsn1BitString()
+        {
+            return new DerBitString(BerBitString.FlattenBitStrings(GetConstructedBitStrings()), false);
+        }
+
         internal override DerExternal ToAsn1External()
         {
             return new DerExternal(this);
         }
+
+        internal override Asn1OctetString ToAsn1OctetString()
+        {
+            return new DerOctetString(BerOctetString.FlattenOctetStrings(GetConstructedOctetStrings()));
+        }
     }
 }