public class OpenPGPKeyEditor extends AbstractOpenPGPKeySignatureGenerator
defaultAeadAlgorithmPreferences, defaultCompressionAlgorithmPreferences, defaultFeatures, defaultHashAlgorithmPreferences, defaultSymmetricKeyPreferences, directKeySignatureSubpackets, encryptionSubkeySubpackets, signingSubkeySubpackets| Constructor and Description |
|---|
OpenPGPKeyEditor(OpenPGPKey key,
KeyPassphraseProvider passphraseProvider) |
OpenPGPKeyEditor(OpenPGPKey key,
KeyPassphraseProvider passphraseProvider,
OpenPGPImplementation implementation) |
OpenPGPKeyEditor(OpenPGPKey key,
KeyPassphraseProvider passphraseProvider,
OpenPGPImplementation implementation,
OpenPGPPolicy policy) |
setDefaultAeadAlgorithmPreferences, setDefaultCompressionAlgorithmPreferences, setDefaultFeatures, setDefaultHashAlgorithmPreferences, setDefaultSymmetricKeyPreferences, setDirectKeySignatureSubpackets, setEncryptionSubkeySubpackets, setSigningSubkeySubpacketspublic OpenPGPKeyEditor(OpenPGPKey key, KeyPassphraseProvider passphraseProvider) throws PGPException
PGPExceptionpublic OpenPGPKeyEditor(OpenPGPKey key, KeyPassphraseProvider passphraseProvider, OpenPGPImplementation implementation) throws PGPException
PGPExceptionpublic OpenPGPKeyEditor(OpenPGPKey key, KeyPassphraseProvider passphraseProvider, OpenPGPImplementation implementation, OpenPGPPolicy policy) throws PGPException
PGPExceptionpublic OpenPGPKeyEditor addDirectKeySignature(SignatureParameters.Callback signatureCallback) throws PGPException
PGPExceptionpublic OpenPGPKeyEditor addUserId(java.lang.String userId) throws PGPException
userId - user-idPGPException - if the key cannot be modifiedpublic OpenPGPKeyEditor addUserId(java.lang.String userId, SignatureParameters.Callback signatureCallback) throws PGPException
SignatureParameters.Callback.
If the key already contains the given user-id, a new certification signature will be added to the user-id.userId - user-idsignatureCallback - callback to modify the certification signature contentsPGPException - if the key cannot be modifiedpublic OpenPGPKeyEditor revokeIdentity(OpenPGPCertificate.OpenPGPIdentityComponent identity) throws PGPException
OpenPGPCertificate.OpenPGPIdentityComponent.identity - user-id to be revokedPGPException - if the key cannot be modifiedpublic OpenPGPKeyEditor revokeIdentity(OpenPGPCertificate.OpenPGPIdentityComponent identity, SignatureParameters.Callback signatureCallback) throws PGPException
OpenPGPCertificate.OpenPGPUserId, allowing modification of the revocation signature
using the given SignatureParameters.Callback.identity - user-id to revokesignatureCallback - callback to modify the revocation signature contentsPGPException - if the key cannot be modifiedpublic OpenPGPKeyEditor addEncryptionSubkey() throws PGPException
PGPExceptionpublic OpenPGPKeyEditor addEncryptionSubkey(KeyPairGeneratorCallback keyGenCallback) throws PGPException
PGPExceptionpublic OpenPGPKeyEditor addEncryptionSubkey(KeyPairGeneratorCallback keyGenCallback, int version, java.util.Date creationTime) throws PGPException
PGPExceptionpublic OpenPGPKeyEditor addEncryptionSubkey(PGPKeyPair encryptionSubkey, SignatureParameters.Callback bindingSigCallback) throws PGPException
PGPExceptionpublic OpenPGPKeyEditor addSigningSubkey() throws PGPException
PGPExceptionpublic OpenPGPKeyEditor addSigningSubkey(KeyPairGeneratorCallback keyGenCallback) throws PGPException
PGPExceptionpublic OpenPGPKeyEditor addSigningSubkey(KeyPairGeneratorCallback keyGenCallback, int version, java.util.Date creationTime) throws PGPException
PGPExceptionpublic OpenPGPKeyEditor addSigningSubkey(PGPKeyPair signingSubkey, SignatureParameters.Callback bindingSigCallback, SignatureParameters.Callback backSigCallback) throws PGPException
PGPExceptionpublic OpenPGPKeyEditor addSubkey(PGPKeyPair subkey, SignatureParameters.Callback bindingSigCallback, SignatureParameters.Callback backSigCallback) throws PGPException
subkey - component keybindingSigCallback - callback to modify the subkey binding signaturebackSigCallback - callback to modify the embedded primary key binding signaturePGPExceptionpublic OpenPGPKeyEditor revokeComponentKey(OpenPGPCertificate.OpenPGPComponentKey componentKey) throws PGPException
PGPExceptionpublic OpenPGPKeyEditor revokeComponentKey(OpenPGPCertificate.OpenPGPComponentKey componentKey, SignatureParameters.Callback revocationSignatureCallback) throws PGPException
PGPExceptionpublic OpenPGPKeyEditor revokeKey() throws PGPException
PGPExceptionpublic OpenPGPKeyEditor revokeKey(SignatureParameters.Callback revocationSignatureCallback) throws PGPException
PGPExceptionpublic OpenPGPKeyEditor changePassphrase(KeyIdentifier componentKeyIdentifier, char[] oldPassphrase, char[] newPassphrase, boolean useAEAD) throws OpenPGPKeyException, PGPException
componentKeyIdentifier - identifier of the component key, whose passphrase shall be changedoldPassphrase - old passphrase (or null)newPassphrase - new passphrase (or null)useAEAD - whether to use AEADOpenPGPKeyException - if the secret component of the component key is missingPGPException - if the key passphrase cannot be changedpublic OpenPGPKeyEditor changePassphrase(KeyIdentifier componentKeyIdentifier, KeyPassphraseProvider passphraseProvider, char[] newPassphrase, boolean useAEAD) throws OpenPGPKeyException, PGPException
componentKeyIdentifier - identifier of the component key, whose passphrase shall be changedpassphraseProvider - provider for the old key passphrasenewPassphrase - new passphrase (or null)useAEAD - whether to use AEADOpenPGPKeyException - if the secret component of the component key is missingPGPException - if the key passphrase cannot be changedpublic OpenPGPKey done()
OpenPGPKey.