Package sop.operation
Interface ChangeKeyPassword
public interface ChangeKeyPassword
-
Method Summary
Modifier and TypeMethodDescriptiondefault Ready
keys
(byte[] keys) keys
(InputStream inputStream) Provide the key material.default ChangeKeyPassword
newKeyPassphrase
(byte[] newPassphrase) Provide a passphrase to re-lock the secret key with.newKeyPassphrase
(String newPassphrase) Provide a passphrase to re-lock the secret key with.noArmor()
Disable ASCII armoring of the output.default ChangeKeyPassword
oldKeyPassphrase
(byte[] password) oldKeyPassphrase
(String oldPassphrase) Provide a passphrase to unlock the secret key.
-
Method Details
-
noArmor
ChangeKeyPassword noArmor()Disable ASCII armoring of the output.- Returns:
- builder instance
-
oldKeyPassphrase
-
oldKeyPassphrase
Provide a passphrase to unlock the secret key. This method can be provided multiple times to provide separate passphrases that are tried as a means to unlock any secret key material encountered.- Parameters:
oldPassphrase
- old passphrase- Returns:
- builder instance
-
newKeyPassphrase
Provide a passphrase to re-lock the secret key with. This method can only be used once, and all key material encountered will be encrypted with the given passphrase. If this method is not called, the key material will not be protected.- Parameters:
newPassphrase
- new passphrase- Returns:
- builder instance
-
newKeyPassphrase
Provide a passphrase to re-lock the secret key with. This method can only be used once, and all key material encountered will be encrypted with the given passphrase. If this method is not called, the key material will not be protected.- Parameters:
newPassphrase
- new passphrase- Returns:
- builder instance
-
keys
-
keys
Provide the key material.- Parameters:
inputStream
- input stream of secret key material- Returns:
- ready
- Throws:
SOPGPException.KeyIsProtected
- if any (sub-) key encountered cannot be unlocked.SOPGPException.BadData
- if the key material is malformed
-