mirror of
https://codeberg.org/PGPainless/sop-java.git
synced 2025-09-07 17:29:44 +02:00
Document update key
This commit is contained in:
parent
8c077a9c13
commit
dea7e905a9
1 changed files with 42 additions and 0 deletions
|
@ -19,25 +19,61 @@ interface UpdateKey {
|
|||
*/
|
||||
fun noArmor(): UpdateKey
|
||||
|
||||
/**
|
||||
* Allow key to be used for signing only.
|
||||
* If this option is not present, the operation may add a new, encryption-capable component key.
|
||||
*/
|
||||
@Throws(SOPGPException.UnsupportedOption::class) fun signingOnly(): UpdateKey
|
||||
|
||||
/**
|
||||
* Do not allow adding new capabilities to the key.
|
||||
* If this option is not present, the operation may add support for new capabilities to the key.
|
||||
*/
|
||||
@Throws(SOPGPException.UnsupportedOption::class) fun noAddedCapabilities(): UpdateKey
|
||||
|
||||
/**
|
||||
* Provide a passphrase for unlocking the secret key.
|
||||
*
|
||||
* @param password password
|
||||
*/
|
||||
@Throws(SOPGPException.PasswordNotHumanReadable::class, SOPGPException.UnsupportedOption::class)
|
||||
fun withKeyPassword(password: String): UpdateKey =
|
||||
withKeyPassword(password.toByteArray(UTF8Util.UTF8))
|
||||
|
||||
/**
|
||||
* Provide a passphrase for unlocking the secret key.
|
||||
*
|
||||
* @param password password
|
||||
*/
|
||||
@Throws(SOPGPException.PasswordNotHumanReadable::class, SOPGPException.UnsupportedOption::class)
|
||||
fun withKeyPassword(password: ByteArray): UpdateKey
|
||||
|
||||
/**
|
||||
* Provide certificates that might contain updated signatures or third-party certifications.
|
||||
* These certificates will be merged into the key.
|
||||
*
|
||||
* @param certs input stream of certificates
|
||||
*/
|
||||
@Throws(
|
||||
SOPGPException.UnsupportedOption::class, SOPGPException.BadData::class, IOException::class)
|
||||
fun mergeCerts(certs: InputStream): UpdateKey
|
||||
|
||||
/**
|
||||
* Provide certificates that might contain updated signatures or third-party certifications.
|
||||
* These certificates will be merged into the key.
|
||||
*
|
||||
* @param certs binary certificates
|
||||
*/
|
||||
@Throws(
|
||||
SOPGPException.UnsupportedOption::class, SOPGPException.BadData::class, IOException::class)
|
||||
fun mergeCerts(certs: ByteArray): UpdateKey = mergeCerts(certs.inputStream())
|
||||
|
||||
/**
|
||||
* Provide the OpenPGP key to update.
|
||||
*
|
||||
* @param key input stream containing the key
|
||||
* @return handle to acquire the updated OpenPGP key from
|
||||
*/
|
||||
@Throws(
|
||||
SOPGPException.BadData::class,
|
||||
IOException::class,
|
||||
|
@ -45,6 +81,12 @@ interface UpdateKey {
|
|||
SOPGPException.PrimaryKeyBad::class)
|
||||
fun key(key: InputStream): Ready
|
||||
|
||||
/**
|
||||
* Provide the OpenPGP key to update.
|
||||
*
|
||||
* @param key binary OpenPGP key
|
||||
* @return handle to acquire the updated OpenPGP key from
|
||||
*/
|
||||
@Throws(
|
||||
SOPGPException.BadData::class,
|
||||
IOException::class,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue