Package sop.operation

# Interface ChangeKeyPassword

public interface ChangeKeyPassword

## Method Summary

Modifier and Type
Method
Description
`default Ready`
`keys(byte[] keys)`
`Ready`
`keys(InputStream inputStream)`
Provide the key material.
`default ChangeKeyPassword`
`newKeyPassphrase(byte[] newPassphrase)`
Provide a passphrase to re-lock the secret key with.
`ChangeKeyPassword`
`newKeyPassphrase(String newPassphrase)`
Provide a passphrase to re-lock the secret key with.
`ChangeKeyPassword`
`noArmor()`
Disable ASCII armoring of the output.
`default ChangeKeyPassword`
`oldKeyPassphrase(byte[] password)`
`ChangeKeyPassword`
`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

default ChangeKeyPassword oldKeyPassphrase(byte[] password)

### oldKeyPassphrase

ChangeKeyPassword oldKeyPassphrase(String oldPassphrase)
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

default ChangeKeyPassword newKeyPassphrase(byte[] newPassphrase)
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

ChangeKeyPassword newKeyPassphrase(String newPassphrase)
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

default Ready keys(byte[] keys) throws SOPGPException.KeyIsProtected, SOPGPException.BadData

Throws:
  `SOPGPException.KeyIsProtected`
  `SOPGPException.BadData`

### keys

Ready keys(InputStream inputStream) throws SOPGPException.KeyIsProtected, SOPGPException.BadData
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