summary refs log tree commit diff
path: root/crypto/src/asn1/Asn1OutputStream.cs
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2023-07-18 13:40:07 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2023-07-18 13:40:07 +0700
commit4d9ade7d08091fdfad3bcaf56f75612267d023b3 (patch)
tree850df982e7b3e84d0633caa45177ff8c79fb1c95 /crypto/src/asn1/Asn1OutputStream.cs
parentDeprecated Asn1TaggedObject.GetObject and refactor (diff)
downloadBouncyCastle.NET-ed25519-4d9ade7d08091fdfad3bcaf56f75612267d023b3.tar.xz
Custom encoding classes for tagged objects
Diffstat (limited to 'crypto/src/asn1/Asn1OutputStream.cs')
-rw-r--r--crypto/src/asn1/Asn1OutputStream.cs5
1 files changed, 5 insertions, 0 deletions
diff --git a/crypto/src/asn1/Asn1OutputStream.cs b/crypto/src/asn1/Asn1OutputStream.cs
index 5fd36aa42..86006877b 100644
--- a/crypto/src/asn1/Asn1OutputStream.cs
+++ b/crypto/src/asn1/Asn1OutputStream.cs
@@ -220,6 +220,11 @@ namespace Org.BouncyCastle.Asn1
             return GetLengthOfIdentifier(tagNo) + GetLengthOfDL(contentsLength) + contentsLength;
         }
 
+        internal static int GetLengthOfEncodingIL(int tagNo, IAsn1Encoding contentsEncoding)
+        {
+            return GetLengthOfIdentifier(tagNo) + 3 + contentsEncoding.GetLength();
+        }
+
         internal static int GetLengthOfEncodingIL(int tagNo, IAsn1Encoding[] contentsEncodings)
         {
             return GetLengthOfIdentifier(tagNo) + 3 + GetLengthOfContents(contentsEncodings);