summary refs log tree commit diff
path: root/crypto/src/asn1/BerNull.cs
blob: 346fea02ef7b268f079dcb11e1471f925c1da08e (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
using System;

namespace Org.BouncyCastle.Asn1
{
	/**
	 * A BER Null object.
	 */
	public class BerNull
		: DerNull
	{
		public static new readonly BerNull Instance = new BerNull();

		private BerNull()
            : base()
		{
		}

		internal override void Encode(Asn1OutputStream asn1Out)
		{
            if (asn1Out.IsBer)
			{
				asn1Out.WriteByte(Asn1Tags.Null);
			}
			else
			{
				base.Encode(asn1Out);
			}
		}
	}
}