Package sop.operation

Interface ChangeKeyPassword


public interface ChangeKeyPassword
  • Method Details

    • 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

      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