summary refs log tree commit diff
path: root/crypto/src/util/io/pem/PemObject.cs
blob: ccba962af704ce19afa63881e36fb799684c87f1 (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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
using System;
using System.Collections.Generic;

namespace Org.BouncyCastle.Utilities.IO.Pem
{
	public class PemObject
		: PemObjectGenerator
	{
		private readonly string m_type;
		private readonly IList<PemHeader> m_headers;
		private readonly byte[] m_content;

		public PemObject(string type, byte[] content)
			: this(type, new List<PemHeader>(), content)
		{
		}

		public PemObject(string type, IList<PemHeader> headers, byte[] content)
		{
			m_type = type;
            m_headers = new List<PemHeader>(headers);
			m_content = content;
		}

		public string Type
		{
			get { return m_type; }
		}

		public IList<PemHeader> Headers
		{
			get { return m_headers; }
		}

		public byte[] Content
		{
			get { return m_content; }
		}

		public PemObject Generate()
		{
			return this;
		}
	}
}