diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2023-07-25 16:43:34 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2023-07-25 16:43:34 +0700 |
commit | 48e949f985e42e5b841e05e9b84a969d63520c1e (patch) | |
tree | 9e2ecbdccc34924c18c3f00a6fc2f57d3a3bf852 /crypto/src/asn1/BEROctetStringParser.cs | |
parent | Warnings cleanup (diff) | |
download | BouncyCastle.NET-ed25519-48e949f985e42e5b841e05e9b84a969d63520c1e.tar.xz |
Mark BER parser classes Obsolete (for removal from public API)
Diffstat (limited to 'crypto/src/asn1/BEROctetStringParser.cs')
-rw-r--r-- | crypto/src/asn1/BEROctetStringParser.cs | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/crypto/src/asn1/BEROctetStringParser.cs b/crypto/src/asn1/BEROctetStringParser.cs index c8c344e11..03dd00fbe 100644 --- a/crypto/src/asn1/BEROctetStringParser.cs +++ b/crypto/src/asn1/BEROctetStringParser.cs @@ -5,26 +5,24 @@ using Org.BouncyCastle.Utilities.IO; namespace Org.BouncyCastle.Asn1 { + [Obsolete("Check for 'Asn1OctetStringParser' instead")] public class BerOctetStringParser : Asn1OctetStringParser { - private readonly Asn1StreamParser _parser; + private readonly Asn1StreamParser m_parser; internal BerOctetStringParser(Asn1StreamParser parser) { - _parser = parser; + m_parser = parser; } - public Stream GetOctetStream() - { - return new ConstructedOctetStream(_parser); - } + public Stream GetOctetStream() => new ConstructedOctetStream(m_parser); public Asn1Object ToAsn1Object() { try { - return Parse(_parser); + return Parse(m_parser); } catch (IOException e) { @@ -32,9 +30,7 @@ namespace Org.BouncyCastle.Asn1 } } - internal static BerOctetString Parse(Asn1StreamParser sp) - { - return new BerOctetString(Streams.ReadAll(new ConstructedOctetStream(sp))); - } + internal static BerOctetString Parse(Asn1StreamParser sp) => + new BerOctetString(Streams.ReadAll(new ConstructedOctetStream(sp))); } } |