01: package org.bouncycastle.bcpg;
02:
03: import java.io.*;
04:
05: /**
06: * basic packet for a PGP secret key
07: */
08: public class SecretSubkeyPacket extends SecretKeyPacket {
09: /**
10: *
11: * @param in
12: * @throws IOException
13: */
14: SecretSubkeyPacket(BCPGInputStream in) throws IOException {
15: super (in);
16: }
17:
18: /**
19: *
20: * @param pubKeyPacket
21: * @param encAlgorithm
22: * @param s2k
23: * @param iv
24: * @param secKeyData
25: */
26: public SecretSubkeyPacket(PublicKeyPacket pubKeyPacket,
27: int encAlgorithm, S2K s2k, byte[] iv, byte[] secKeyData) {
28: super (pubKeyPacket, encAlgorithm, s2k, iv, secKeyData);
29: }
30:
31: public SecretSubkeyPacket(PublicKeyPacket pubKeyPacket,
32: int encAlgorithm, int s2kUsage, S2K s2k, byte[] iv,
33: byte[] secKeyData) {
34: super (pubKeyPacket, encAlgorithm, s2kUsage, s2k, iv, secKeyData);
35: }
36:
37: public void encode(BCPGOutputStream out) throws IOException {
38: out.writePacket(SECRET_SUBKEY, getEncodedContents(), true);
39: }
40: }
|