diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2021-10-14 20:33:18 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2021-10-14 20:33:18 +0700 |
commit | 61605407b72d584c94daeafe4ea4c2b1cad3914e (patch) | |
tree | fb8d07b180f7c06dd1438e1a5796d4766df6d44a /crypto/src/asn1/BEROctetStringGenerator.cs | |
parent | Fix and Obsolete BerNull (diff) | |
download | BouncyCastle.NET-ed25519-61605407b72d584c94daeafe4ea4c2b1cad3914e.tar.xz |
Add withID to Encode method
- refactor Asn1OutputStream utility methods
Diffstat (limited to 'crypto/src/asn1/BEROctetStringGenerator.cs')
-rw-r--r-- | crypto/src/asn1/BEROctetStringGenerator.cs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/crypto/src/asn1/BEROctetStringGenerator.cs b/crypto/src/asn1/BEROctetStringGenerator.cs index 4a7f1e8e5..37e46bea5 100644 --- a/crypto/src/asn1/BEROctetStringGenerator.cs +++ b/crypto/src/asn1/BEROctetStringGenerator.cs @@ -67,7 +67,7 @@ namespace Org.BouncyCastle.Asn1 if (_off == _buf.Length) { - DerOctetString.Encode(_derOut, _buf, 0, _off); + DerOctetString.Encode(_derOut, true, _buf, 0, _off); _off = 0; } } @@ -88,13 +88,13 @@ namespace Org.BouncyCastle.Asn1 { Array.Copy(b, off, _buf, _off, available); count += available; - DerOctetString.Encode(_derOut, _buf, 0, bufLen); + DerOctetString.Encode(_derOut, true, _buf, 0, bufLen); } int remaining; while ((remaining = len - count) >= bufLen) { - DerOctetString.Encode(_derOut, b, off + count, bufLen); + DerOctetString.Encode(_derOut, true, b, off + count, bufLen); count += bufLen; } @@ -109,7 +109,7 @@ namespace Org.BouncyCastle.Asn1 { if (_off != 0) { - DerOctetString.Encode(_derOut, _buf, 0, _off); + DerOctetString.Encode(_derOut, true, _buf, 0, _off); } _derOut.FlushInternal(); @@ -123,7 +123,7 @@ namespace Org.BouncyCastle.Asn1 { if (_off != 0) { - DerOctetString.Encode(_derOut, _buf, 0, _off); + DerOctetString.Encode(_derOut, true, _buf, 0, _off); } _derOut.FlushInternal(); |