summary refs log tree commit diff
path: root/crypto/src/asn1/DERExternalParser.cs
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2021-10-15 16:10:37 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2021-10-15 16:10:37 +0700
commit2e690b9bb3da422608a86f70fc9090923b398694 (patch)
tree6f2a7da682fce10b58d8615e86ba5d2ef4d882fe /crypto/src/asn1/DERExternalParser.cs
parentReplace Obsolete tag (diff)
downloadBouncyCastle.NET-ed25519-2e690b9bb3da422608a86f70fc9090923b398694.tar.xz
Refactor ASN.1 parsers
Diffstat (limited to '')
-rw-r--r--crypto/src/asn1/DERExternalParser.cs11
1 files changed, 8 insertions, 3 deletions
diff --git a/crypto/src/asn1/DERExternalParser.cs b/crypto/src/asn1/DERExternalParser.cs
index 70e426fed..5e52e63c6 100644
--- a/crypto/src/asn1/DERExternalParser.cs
+++ b/crypto/src/asn1/DERExternalParser.cs
@@ -1,5 +1,4 @@
 using System;
-using System.IO;
 
 namespace Org.BouncyCastle.Asn1
 {
@@ -8,6 +7,7 @@ namespace Org.BouncyCastle.Asn1
 	{
 		private readonly Asn1StreamParser _parser;
 
+        [Obsolete("Will be removed")]
 		public DerExternalParser(Asn1StreamParser parser)
 		{
 			this._parser = parser;
@@ -20,7 +20,12 @@ namespace Org.BouncyCastle.Asn1
 
 		public override Asn1Object ToAsn1Object()
 		{
-			return new DerExternal(_parser.ReadVector());
+            return Parse(_parser);
 		}
-	}
+
+        internal static DerExternal Parse(Asn1StreamParser sp)
+        {
+            return new DerExternal(sp.ReadVector());
+        }
+    }
 }