summary refs log tree commit diff
path: root/crypto/src/openpgp/PgpMarker.cs
blob: fdbc02bc1af2f37ae8e27aeea706cfcb37eb450c (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
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 markerPacket))
                throw new IOException("unexpected packet in stream: " + packet);

            this.data = markerPacket;
        }
	}
}