summary refs log tree commit diff
path: root/crypto/src/asn1/Asn1Object.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/asn1/Asn1Object.cs')
-rw-r--r--crypto/src/asn1/Asn1Object.cs10
1 files changed, 4 insertions, 6 deletions
diff --git a/crypto/src/asn1/Asn1Object.cs b/crypto/src/asn1/Asn1Object.cs
index 9945a7fae..0cf89052b 100644
--- a/crypto/src/asn1/Asn1Object.cs
+++ b/crypto/src/asn1/Asn1Object.cs
@@ -9,14 +9,14 @@ namespace Org.BouncyCastle.Asn1
         public override void EncodeTo(Stream output)
         {
             Asn1OutputStream asn1Out = Asn1OutputStream.Create(output);
-            Encode(asn1Out, true);
+            GetEncoding(asn1Out.Encoding).Encode(asn1Out);
             asn1Out.FlushInternal();
         }
 
         public override void EncodeTo(Stream output, string encoding)
         {
             Asn1OutputStream asn1Out = Asn1OutputStream.Create(output, encoding);
-            Encode(asn1Out, true);
+            GetEncoding(asn1Out.Encoding).Encode(asn1Out);
             asn1Out.FlushInternal();
         }
 
@@ -71,11 +71,9 @@ namespace Org.BouncyCastle.Asn1
             return this;
         }
 
-        internal abstract bool EncodeConstructed(int encoding);
+        internal abstract IAsn1Encoding GetEncoding(int encoding);
 
-        internal abstract int EncodedLength(int encoding, bool withID);
-
-        internal abstract void Encode(Asn1OutputStream asn1Out, bool withID);
+        internal abstract IAsn1Encoding GetEncodingImplicit(int encoding, int tagClass, int tagNo);
 
         protected abstract bool Asn1Equals(Asn1Object asn1Object);
 		protected abstract int Asn1GetHashCode();