summary refs log tree commit diff
path: root/crypto/src/openpgp/PgpMarker.cs
blob: 7257767ec39295600d5937b61b513b8d83de6129 (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
using System;
using System.IO;

namespace Org.BouncyCastle.Bcpg.OpenPgp
{
	/// <remarks>
	/// A PGP marker packet - in general these should be ignored other than where
	/// the idea is to preserve the original input stream.
	/// </remarks>
    public class PgpMarker
		: PgpObject
    {
        private readonly MarkerPacket data;

		public PgpMarker(
            BcpgInputStream bcpgInput)
        {
            Packet packet = bcpgInput.ReadPacket();
            if (!(packet is MarkerPacket))
                throw new IOException("unexpected packet in stream: " + packet);

            this.data = (MarkerPacket)packet;
        }
	}
}