diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2023-07-18 13:40:07 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2023-07-18 13:40:07 +0700 |
commit | 4d9ade7d08091fdfad3bcaf56f75612267d023b3 (patch) | |
tree | 850df982e7b3e84d0633caa45177ff8c79fb1c95 /crypto/src/asn1/Asn1OutputStream.cs | |
parent | Deprecated Asn1TaggedObject.GetObject and refactor (diff) | |
download | BouncyCastle.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.cs | 5 |
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); |