diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2021-10-14 22:49:24 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2021-10-14 22:49:24 +0700 |
commit | 378482f5a877e34ae9cabade06d6f3111c088f49 (patch) | |
tree | 79c396cc9b79d129e95ec3927c54d139d6b5bc72 /crypto/src/asn1/DerNull.cs | |
parent | Add withID to Encode method (diff) | |
download | BouncyCastle.NET-ed25519-378482f5a877e34ae9cabade06d6f3111c088f49.tar.xz |
Initial pass at EncodedLength methods
Diffstat (limited to 'crypto/src/asn1/DerNull.cs')
-rw-r--r-- | crypto/src/asn1/DerNull.cs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/crypto/src/asn1/DerNull.cs b/crypto/src/asn1/DerNull.cs index 01a2e3c72..1ee374db4 100644 --- a/crypto/src/asn1/DerNull.cs +++ b/crypto/src/asn1/DerNull.cs @@ -16,7 +16,12 @@ namespace Org.BouncyCastle.Asn1 { } - internal override void Encode(Asn1OutputStream asn1Out, bool withID) + internal override int EncodedLength(bool withID) + { + return Asn1OutputStream.GetLengthOfEncodingDL(withID, 0); + } + + internal override void Encode(Asn1OutputStream asn1Out, bool withID) { asn1Out.WriteEncodingDL(withID, Asn1Tags.Null, ZeroBytes); } |