01: package org.bouncycastle.bcpg;
02:
03: import java.io.*;
04: import java.util.Date;
05:
06: /**
07: * basic packet for a PGP public key
08: */
09: public class PublicSubkeyPacket extends PublicKeyPacket {
10: PublicSubkeyPacket(BCPGInputStream in) throws IOException {
11: super (in);
12: }
13:
14: /**
15: * Construct version 4 public key packet.
16: *
17: * @param algorithm
18: * @param time
19: * @param key
20: */
21: public PublicSubkeyPacket(int algorithm, Date time, BCPGKey key) {
22: super (algorithm, time, key);
23: }
24:
25: public void encode(BCPGOutputStream out) throws IOException {
26: out.writePacket(PUBLIC_SUBKEY, getEncodedContents(), true);
27: }
28: }
|