From 39ff2bca73b81ee539a44962c5e96ed6aae5db62 Mon Sep 17 00:00:00 2001 From: Paul Schaub Date: Mon, 29 Aug 2022 12:35:51 +0200 Subject: [PATCH] Fix javadoc of SigningOptions methods --- .../encryption_signing/SigningOptions.java | 26 ++++++++++++++----- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/pgpainless-core/src/main/java/org/pgpainless/encryption_signing/SigningOptions.java b/pgpainless-core/src/main/java/org/pgpainless/encryption_signing/SigningOptions.java index f81bf5aa..43db00d1 100644 --- a/pgpainless-core/src/main/java/org/pgpainless/encryption_signing/SigningOptions.java +++ b/pgpainless-core/src/main/java/org/pgpainless/encryption_signing/SigningOptions.java @@ -104,6 +104,7 @@ public final class SigningOptions { * @param signingKey key ring containing the signing key * @return this * + * @throws KeyException if something is wrong with the key * @throws PGPException if the key cannot be unlocked or a signing method cannot be created */ public SigningOptions addSignature(SecretKeyRingProtector signingKeyProtector, @@ -119,6 +120,7 @@ public final class SigningOptions { * @param signingKeys collection of signing keys * @param signatureType type of signature (binary, canonical text) * @return this + * * @throws KeyException if something is wrong with any of the keys * @throws PGPException if any of the keys cannot be unlocked or a signing method cannot be created */ @@ -140,9 +142,10 @@ public final class SigningOptions { * @param secretKeyDecryptor decryptor to unlock the signing secret key * @param secretKey signing key * @param signatureType type of signature (binary, canonical text) + * @return this + * * @throws KeyException if something is wrong with the key * @throws PGPException if the key cannot be unlocked or the signing method cannot be created - * @return this */ public SigningOptions addInlineSignature(SecretKeyRingProtector secretKeyDecryptor, PGPSecretKeyRing secretKey, @@ -163,7 +166,8 @@ public final class SigningOptions { * @param userId user-id of the signer * @param signatureType signature type (binary, canonical text) * @return this - * @throws KeyException if the key is invalid + * + * @throws KeyException if something is wrong with the key * @throws PGPException if the key cannot be unlocked or the signing method cannot be created */ public SigningOptions addInlineSignature(SecretKeyRingProtector secretKeyDecryptor, @@ -187,8 +191,8 @@ public final class SigningOptions { * @param signatureType signature type (binary, canonical text) * @param subpacketsCallback callback to modify the hashed and unhashed subpackets of the signature * @return this - * @throws KeyException - * if the key is invalid + * + * @throws KeyException if the key is invalid * @throws PGPException if the key cannot be unlocked or the signing method cannot be created */ public SigningOptions addInlineSignature(SecretKeyRingProtector secretKeyDecryptor, @@ -234,6 +238,8 @@ public final class SigningOptions { * @param signingKeys collection of signing key rings * @param signatureType type of the signature (binary, canonical text) * @return this + * + * @throws KeyException if something is wrong with any of the keys * @throws PGPException if any of the keys cannot be validated or unlocked, or if any signing method cannot be created */ public SigningOptions addDetachedSignatures(SecretKeyRingProtector secretKeyDecryptor, @@ -255,8 +261,10 @@ public final class SigningOptions { * @param secretKeyDecryptor decryptor to unlock the secret signing key * @param secretKey signing key * @param signatureType type of data that is signed (binary, canonical text) - * @throws PGPException if the key cannot be validated or unlocked, or if no signature method can be created * @return this + * + * @throws KeyException if something is wrong with the key + * @throws PGPException if the key cannot be validated or unlocked, or if no signature method can be created */ public SigningOptions addDetachedSignature(SecretKeyRingProtector secretKeyDecryptor, PGPSecretKeyRing secretKey, @@ -277,8 +285,10 @@ public final class SigningOptions { * @param secretKey signing key * @param userId user-id * @param signatureType type of data that is signed (binary, canonical text) - * @throws PGPException if the key cannot be validated or unlocked, or if no signature method can be created * @return this + * + * @throws KeyException if something is wrong with the key + * @throws PGPException if the key cannot be validated or unlocked, or if no signature method can be created */ public SigningOptions addDetachedSignature(SecretKeyRingProtector secretKeyDecryptor, PGPSecretKeyRing secretKey, @@ -301,8 +311,10 @@ public final class SigningOptions { * @param userId user-id * @param signatureType type of data that is signed (binary, canonical text) * @param subpacketCallback callback to modify hashed and unhashed subpackets of the signature - * @throws PGPException if the key cannot be validated or unlocked, or if no signature method can be created * @return this + * + * @throws KeyException if something is wrong with the key + * @throws PGPException if the key cannot be validated or unlocked, or if no signature method can be created */ public SigningOptions addDetachedSignature(SecretKeyRingProtector secretKeyDecryptor, PGPSecretKeyRing secretKey,