diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-11-01 14:39:54 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-11-01 14:39:54 +0700 |
commit | 716a491e3ed312da6c80a74e327d62dd4388b11e (patch) | |
tree | 0adabea28431857f372256233ddd4b2e0982190b /crypto/src/cms/CMSCompressedDataStreamGenerator.cs | |
parent | Package with LICENSE.md file (diff) | |
download | BouncyCastle.NET-ed25519-716a491e3ed312da6c80a74e327d62dd4388b11e.tar.xz |
More Span-based Stream methods
Diffstat (limited to 'crypto/src/cms/CMSCompressedDataStreamGenerator.cs')
-rw-r--r-- | crypto/src/cms/CMSCompressedDataStreamGenerator.cs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/crypto/src/cms/CMSCompressedDataStreamGenerator.cs b/crypto/src/cms/CMSCompressedDataStreamGenerator.cs index 1594500cd..3669c0b3a 100644 --- a/crypto/src/cms/CMSCompressedDataStreamGenerator.cs +++ b/crypto/src/cms/CMSCompressedDataStreamGenerator.cs @@ -4,6 +4,7 @@ using System.IO; using Org.BouncyCastle.Asn1; using Org.BouncyCastle.Asn1.Cms; using Org.BouncyCastle.Asn1.X509; +using Org.BouncyCastle.Crypto.IO; using Org.BouncyCastle.Utilities; using Org.BouncyCastle.Utilities.IO; @@ -118,7 +119,14 @@ namespace Org.BouncyCastle.Cms _out.Write(buffer, offset, count); } - public override void WriteByte(byte value) +#if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER + public override void Write(ReadOnlySpan<byte> buffer) + { + _out.Write(buffer); + } +#endif + + public override void WriteByte(byte value) { _out.WriteByte(value); } |