Top Description Fields Constructors Methods
org.bouncycastle.bcpg

public Class SecretSubkeyPacket

extends SecretKeyPacket
Class Inheritance
Imports
java.io.IOException

basic packet for a PGP secret key

Field Summary

Inherited from org.bouncycastle.bcpg.SecretKeyPacket:
USAGE_AEADUSAGE_CHECKSUMUSAGE_NONEUSAGE_SHA1

Constructor Summary

AccessConstructor and Description
pack-priv
SecretSubkeyPacket(BCPGInputStream
input stream
in
)

Parse a secret subkey packet from an input stream.

pack-priv
SecretSubkeyPacket(BCPGInputStream in, boolean newPacketFormat)

public
SecretSubkeyPacket(PublicKeyPacket
public subkey packet
pubKeyPacket
,
int
encryption algorithm
encAlgorithm
,
S2K
s2k identifier
s2k
,
byte[]
optional iv for the encryption algorithm
iv
,
byte[]
secret key data
secKeyData
)

Create a secret subkey packet.

public
SecretSubkeyPacket(PublicKeyPacket
public subkey packet
pubKeyPacket
,
int
encryption algorithm
encAlgorithm
,
int
s2k usage
s2kUsage
,
S2K
s2k identifier
s2k
,
byte[]
optional iv for the encryption algorithm
iv
,
byte[]
secret key data
secKeyData
)

Create a secret subkey packet.

public
SecretSubkeyPacket(PublicKeyPacket
public subkey packet
pubKeyPacket
,
int
encryption algorithm
encAlgorithm
,
int
aead algorithm
aeadAlgorithm
,
int
s2k usage
s2kUsage
,
S2K
s2k identifier
s2K
,
byte[]
optional iv for the AEAD algorithm or encryption algorithm
iv
,
byte[]
secret key data
secKeyData
)

Create a secret subkey packet.

Method Summary

Inherited from org.bouncycastle.bcpg.SecretKeyPacket:
encodegetAeadAlgorithmgetEncAlgorithmgetEncodedContentsgetIVgetPublicKeyPacketgetS2KgetS2KUsagegetSecretKeyData

Constructor Detail

SecretSubkeyPacketback to summary
pack-priv SecretSubkeyPacket(BCPGInputStream in) throws IOException

Parse a secret subkey packet from an input stream.

Parameters
in:BCPGInputStream

input stream

SecretSubkeyPacketback to summary
pack-priv SecretSubkeyPacket(BCPGInputStream in, boolean newPacketFormat) throws IOException
SecretSubkeyPacketback to summary
public SecretSubkeyPacket(PublicKeyPacket pubKeyPacket, int encAlgorithm, S2K s2k, byte[] iv, byte[] secKeyData)

Create a secret subkey packet. If the encryption algorithm is NOT SymmetricKeyAlgorithmTags#NULL, the USAGE_SHA1 will be used as S2K usage, otherwise the key will be unencrypted (USAGE_NONE).

Parameters
pubKeyPacket:PublicKeyPacket

public subkey packet

encAlgorithm:int

encryption algorithm

s2k:S2K

s2k identifier

iv:byte[]

optional iv for the encryption algorithm

secKeyData:byte[]

secret key data

SecretSubkeyPacketback to summary
public SecretSubkeyPacket(PublicKeyPacket pubKeyPacket, int encAlgorithm, int s2kUsage, S2K s2k, byte[] iv, byte[] secKeyData)

Create a secret subkey packet.

Parameters
pubKeyPacket:PublicKeyPacket

public subkey packet

encAlgorithm:int

encryption algorithm

s2kUsage:int

s2k usage

s2k:S2K

s2k identifier

iv:byte[]

optional iv for the encryption algorithm

secKeyData:byte[]

secret key data

SecretSubkeyPacketback to summary
public SecretSubkeyPacket(PublicKeyPacket pubKeyPacket, int encAlgorithm, int aeadAlgorithm, int s2kUsage, S2K s2K, byte[] iv, byte[] secKeyData)

Create a secret subkey packet.

Parameters
pubKeyPacket:PublicKeyPacket

public subkey packet

encAlgorithm:int

encryption algorithm

aeadAlgorithm:int

aead algorithm

s2kUsage:int

s2k usage

s2K:S2K

s2k identifier

iv:byte[]

optional iv for the AEAD algorithm or encryption algorithm

secKeyData:byte[]

secret key data