summary refs log tree commit diff
path: root/crypto/src/asn1/DerBitString.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/asn1/DerBitString.cs')
-rw-r--r--crypto/src/asn1/DerBitString.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/src/asn1/DerBitString.cs b/crypto/src/asn1/DerBitString.cs
index 282e97929..624da6763 100644
--- a/crypto/src/asn1/DerBitString.cs
+++ b/crypto/src/asn1/DerBitString.cs
@@ -191,7 +191,7 @@ namespace Org.BouncyCastle.Asn1
 			}
 		}
 
-        internal override void Encode(Asn1OutputStream asn1Out)
+        internal override void Encode(Asn1OutputStream asn1Out, bool withID)
 		{
             if (mPadBits > 0)
             {
@@ -208,12 +208,12 @@ namespace Org.BouncyCastle.Asn1
                      */
                     contents[contents.Length - 1] = (byte)(last ^ unusedBits);
 
-                    asn1Out.WriteEncoded(Asn1Tags.BitString, contents);
+                    asn1Out.WriteEncodingDL(withID, Asn1Tags.BitString, contents);
                     return;
                 }
             }
 
-            asn1Out.WriteEncoded(Asn1Tags.BitString, (byte)mPadBits, mData);
+            asn1Out.WriteEncodingDL(withID, Asn1Tags.BitString, (byte)mPadBits, mData, 0, mData.Length);
 		}
 
         protected override int Asn1GetHashCode()