summary refs log tree commit diff
path: root/crypto/src/asn1/BerApplicationSpecificParser.cs
blob: 7d2c4b3e80c495f2195b14ca58ca493fb92dcecd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
using System;

namespace Org.BouncyCastle.Asn1
{
	public class BerApplicationSpecificParser
		: IAsn1ApplicationSpecificParser
	{
		private readonly int tag;
		private readonly Asn1StreamParser parser;

		internal BerApplicationSpecificParser(
			int					tag,
			Asn1StreamParser	parser)
		{
			this.tag = tag;
			this.parser = parser;
		}

		public IAsn1Convertible ReadObject()
		{
			return parser.ReadObject();
		}

		public Asn1Object ToAsn1Object()
		{
			return new BerApplicationSpecific(tag, parser.ReadVector());
		}
	}
}