public class KeyRingSubKeyFix extends Object
Constructor and Description |
---|
KeyRingSubKeyFix() |
Modifier and Type | Method and Description |
---|---|
static org.bouncycastle.openpgp.PGPSecretKeyRing |
repairSubkeyPackets(org.bouncycastle.openpgp.PGPSecretKeyRing secretKeys,
org.bouncycastle.openpgp.operator.PBESecretKeyDecryptor decryptor,
org.bouncycastle.openpgp.operator.PBESecretKeyEncryptor encryptor)
This method makes sure, that sub keys do consist of sub key packets.
|
public KeyRingSubKeyFix()
public static org.bouncycastle.openpgp.PGPSecretKeyRing repairSubkeyPackets(@Nonnull org.bouncycastle.openpgp.PGPSecretKeyRing secretKeys, @Nullable org.bouncycastle.openpgp.operator.PBESecretKeyDecryptor decryptor, @Nullable org.bouncycastle.openpgp.operator.PBESecretKeyEncryptor encryptor) throws org.bouncycastle.openpgp.PGPException
PGPSecretKeyRing
s which sub keys consisted of
normal public key packets, which would result in lost keys when converting PGPSecretKeyRings to PGPPublicKeyRings.
This method throws a RuntimeException
of a NoSuchFieldException
or IllegalAccessException
.secretKeys
- possibly faulty PGPSecretKeyRingdecryptor
- decryptor in case the keys are encrypted (can be null)encryptor
- encryptor to re-encrypt the keys in case they are encrypted (can be null)org.bouncycastle.openpgp.PGPException
- in case we cannot dismantle or reassemble the key.