diff --git a/pgpainless-core/src/main/java/org/pgpainless/decryption_verification/ConsumerOptions.java b/pgpainless-core/src/main/java/org/pgpainless/decryption_verification/ConsumerOptions.java index 5cbf2ce7..aec2766a 100644 --- a/pgpainless-core/src/main/java/org/pgpainless/decryption_verification/ConsumerOptions.java +++ b/pgpainless-core/src/main/java/org/pgpainless/decryption_verification/ConsumerOptions.java @@ -169,7 +169,6 @@ public class ConsumerOptions { public ConsumerOptions setSessionKey(@Nonnull byte[] sessionKey) { this.sessionKey = sessionKey; throw new NotYetImplementedException(); - // return this; } /** diff --git a/pgpainless-core/src/main/java/org/pgpainless/encryption_signing/EncryptionResult.java b/pgpainless-core/src/main/java/org/pgpainless/encryption_signing/EncryptionResult.java index 1045c754..46717cc2 100644 --- a/pgpainless-core/src/main/java/org/pgpainless/encryption_signing/EncryptionResult.java +++ b/pgpainless-core/src/main/java/org/pgpainless/encryption_signing/EncryptionResult.java @@ -56,42 +56,87 @@ public final class EncryptionResult { this.fileEncoding = encoding; } + /** + * Return the symmetric encryption algorithm used to encrypt the message. + * @return symmetric encryption algorithm + * + * @deprecated use {@link #getEncryptionAlgorithm()} instead. + */ @Deprecated public SymmetricKeyAlgorithm getSymmetricKeyAlgorithm() { return getEncryptionAlgorithm(); } + /** + * Return the symmetric encryption algorithm used to encrypt the message. + * + * @return symmetric encryption algorithm + * */ public SymmetricKeyAlgorithm getEncryptionAlgorithm() { return encryptionAlgorithm; } + /** + * Return the compression algorithm that was used to compress the message before encryption/signing. + * + * @return compression algorithm + */ public CompressionAlgorithm getCompressionAlgorithm() { return compressionAlgorithm; } + /** + * Return a {@link MultiMap} of key identifiers and detached signatures that were generated for the message. + * Each key of the map represents a signing key, which has one or more detached signatures associated with it. + * + * @return detached signatures + */ public MultiMap getDetachedSignatures() { return detachedSignatures; } + /** + * Return the set of recipient encryption keys. + * + * @return recipients + */ public Set getRecipients() { return recipients; } /** + * Return the file name of the encrypted/signed data. * + * @return filename */ public String getFileName() { return fileName; } + /** + * Return the modification date of the encrypted/signed file. + * + * @return modification date + */ public Date getModificationDate() { return modificationDate; } + /** + * Return the encoding format of the encrypted/signed data. + * + * @return encoding format + */ public StreamEncoding getFileEncoding() { return fileEncoding; } + /** + * Return true, if the message is marked as for-your-eyes-only. + * This is typically done by setting the filename "_CONSOLE". + * + * @return is message for your eyes only? + */ public static Builder builder() { return new Builder(); } diff --git a/pgpainless-core/src/main/java/org/pgpainless/policy/Policy.java b/pgpainless-core/src/main/java/org/pgpainless/policy/Policy.java index a2fec31f..943cf2aa 100644 --- a/pgpainless-core/src/main/java/org/pgpainless/policy/Policy.java +++ b/pgpainless-core/src/main/java/org/pgpainless/policy/Policy.java @@ -428,7 +428,7 @@ public final class Policy { minimalBitStrengths.put(PublicKeyAlgorithm.RSA_GENERAL, 2000); minimalBitStrengths.put(PublicKeyAlgorithm.RSA_SIGN, 2000); minimalBitStrengths.put(PublicKeyAlgorithm.RSA_ENCRYPT, 2000); - // TODO: ElGamal is not mentioned in the BSI document. + // Note: ElGamal is not mentioned in the BSI document. // We assume that the requirements are similar to other DH algorithms minimalBitStrengths.put(PublicKeyAlgorithm.ELGAMAL_ENCRYPT, 2000); minimalBitStrengths.put(PublicKeyAlgorithm.ELGAMAL_GENERAL, 2000); @@ -436,7 +436,7 @@ public final class Policy { minimalBitStrengths.put(PublicKeyAlgorithm.DSA, 2000); // §5.4.3 minimalBitStrengths.put(PublicKeyAlgorithm.ECDSA, 250); - // TODO: EdDSA is not mentioned in the BSI document. + // Note: EdDSA is not mentioned in the BSI document. // We assume that the requirements are similar to other EC algorithms. minimalBitStrengths.put(PublicKeyAlgorithm.EDDSA, 250); // §7.2.1 @@ -451,7 +451,7 @@ public final class Policy { /** * Return the {@link NotationRegistry} of PGPainless. - * The notation registry is used to decide, whether or not a Notation is known or not. + * The notation registry is used to decide, whether a Notation is known or not. * Background: Critical unknown notations render signatures invalid. * * @return Notation registry diff --git a/pgpainless-core/src/main/java/org/pgpainless/signature/DetachedSignature.java b/pgpainless-core/src/main/java/org/pgpainless/signature/DetachedSignature.java index 862a833d..864c8d41 100644 --- a/pgpainless-core/src/main/java/org/pgpainless/signature/DetachedSignature.java +++ b/pgpainless-core/src/main/java/org/pgpainless/signature/DetachedSignature.java @@ -92,6 +92,7 @@ public class DetachedSignature { * Return the {@link OpenPgpV4Fingerprint} of the key that created the signature. * * @return fingerprint of the signing key + * @deprecated use {@link #getSigningKeyIdentifier()} instead. */ @Deprecated public OpenPgpV4Fingerprint getFingerprint() { diff --git a/pgpainless-core/src/main/java/org/pgpainless/signature/subpackets/SignatureSubpacketsUtil.java b/pgpainless-core/src/main/java/org/pgpainless/signature/subpackets/SignatureSubpacketsUtil.java index 1fb68f20..19ec1b21 100644 --- a/pgpainless-core/src/main/java/org/pgpainless/signature/subpackets/SignatureSubpacketsUtil.java +++ b/pgpainless-core/src/main/java/org/pgpainless/signature/subpackets/SignatureSubpacketsUtil.java @@ -479,7 +479,6 @@ public final class SignatureSubpacketsUtil { /** * Return the signatures exportable certification subpacket from the hashed area. - * TODO: Can this packet also be placed in the unhashed area? * * @param signature signature * @return exportable certification subpacket