Package sop.operation

# Interface AbstractSign<T>

All Known Subinterfaces:
  `DetachedSign`, `InlineSign`

public interface AbstractSign<T>

## Method Summary

Modifier and Type
Method
Description
`default T`
`key(byte[] key)`
Add one or more signing keys.
`T`
`key(InputStream key)`
Add one or more signing keys.
`T`
`noArmor()`
Disable ASCII armor encoding.
`T`
`withKeyPassword(byte[] password)`
Provide the password for the secret key used for signing.
`default T`
`withKeyPassword(String password)`
Provide the password for the secret key used for signing.

## Method Details

### noArmor

T noArmor()
Disable ASCII armor encoding.

Returns:
  builder instance

### key

T key(InputStream key) throws SOPGPException.KeyCannotSign, SOPGPException.BadData, SOPGPException.UnsupportedAsymmetricAlgo, IOException
Add one or more signing keys.

Parameters:
  `key` - input stream containing encoded keys
Returns:
  builder instance
Throws:
  `SOPGPException.KeyCannotSign` - if the key cannot be used for signing
  `SOPGPException.BadData` - if the `InputStream` does not contain an OpenPGP key
  `SOPGPException.UnsupportedAsymmetricAlgo` - if the key uses an unsupported asymmetric algorithm
  `IOException` - in case of an IO error

### key

default T key(byte[] key) throws SOPGPException.KeyCannotSign, SOPGPException.BadData, SOPGPException.UnsupportedAsymmetricAlgo, IOException
Add one or more signing keys.

Parameters:
  `key` - byte array containing encoded keys
Returns:
  builder instance
Throws:
  `SOPGPException.KeyCannotSign` - if the key cannot be used for signing
  `SOPGPException.BadData` - if the byte array does not contain an OpenPGP key
  `SOPGPException.UnsupportedAsymmetricAlgo` - if the key uses an unsupported asymmetric algorithm
  `IOException` - in case of an IO error

### withKeyPassword

default T withKeyPassword(String password) throws SOPGPException.UnsupportedOption, SOPGPException.PasswordNotHumanReadable
Provide the password for the secret key used for signing.

Parameters:
  `password` - password
Returns:
  builder instance
Throws:
  `SOPGPException.UnsupportedOption` - if key passwords are not supported
  `SOPGPException.PasswordNotHumanReadable` - if the provided passphrase is not human-readable

### withKeyPassword

T withKeyPassword(byte[] password) throws SOPGPException.UnsupportedOption, SOPGPException.PasswordNotHumanReadable
Provide the password for the secret key used for signing.

Parameters:
  `password` - password
Returns:
  builder instance
Throws:
  `SOPGPException.UnsupportedOption` - if key passwords are not supported
  `SOPGPException.PasswordNotHumanReadable` - if the provided passphrase is not human-readable