Source code: cryptix/openpgp/packet/PGPMarkerPacket.java
1 /* $Id: PGPMarkerPacket.java,v 1.2 2005/03/13 17:46:37 woudt Exp $
2 *
3 * Copyright (C) 1999-2005 The Cryptix Foundation Limited.
4 * All rights reserved.
5 *
6 * Use, modification, copying and distribution of this software is subject
7 * the terms and conditions of the Cryptix General Licence. You should have
8 * received a copy of the Cryptix General License along with this library;
9 * if not, you can download a copy from http://www.cryptix.org/ .
10 */
11
12 package cryptix.openpgp.packet;
13
14 /**
15 * The marker packet.
16 *
17 * <p>RFC 2440 says:</p>
18 * <pre>5.8. Marker Packet (Obsolete Literal Packet) (Tag 10)
19 *
20 * An experimental version of PGP used this packet as the Literal
21 * packet, but no released version of PGP generated Literal packets
22 * with this tag. With PGP 5.x, this packet has been re-assigned and is
23 * reserved for use as the Marker packet.
24 *
25 * The body of this packet consists of:
26 *
27 * - The three octets 0x50, 0x47, 0x50 (which spell "PGP" in UTF-8).
28 *
29 * Such a packet MUST be ignored when received. It may be placed at
30 * the beginning of a message that uses features not available in PGP
31 * 2.6.x in order to cause that version to report that newer software
32 * is necessary to process the message.</pre>
33 *
34 * <p>This implementation ignores this packet completely. It extends from
35 * PGPDummyPacket. When read, it does not check if the content is correct
36 * according to the above quote from RFC 2440. When you create a new packet
37 * though, it will insure it is correct.</p>
38 *
39 * @author Edwin Woudt (edwin@cryptix.org)
40 * @version $Revision: 1.2 $
41 */
42
43 public class PGPMarkerPacket extends PGPDummyPacket {
44
45
46 /**
47 * Empty constructor.
48 *
49 * <p>Initializes this packet with the default payload.</p>
50 *
51 * <p>Remember to use setPacketID to set the packet ID.</p>
52 */
53 public PGPMarkerPacket () {
54 super();
55 byte[] content = new byte[3];
56 content[0] = 0x50;
57 content[1] = 0x47;
58 content[2] = 0x50;
59 this.setPayload(content);
60 }
61
62 }