1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2025-09-09 18:29:39 +02:00

Fix more javadoc references

This commit is contained in:
Paul Schaub 2025-05-15 14:21:06 +02:00
parent ca1dfae86f
commit 30de257d46
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
11 changed files with 36 additions and 47 deletions

View file

@ -25,8 +25,7 @@ enum class PublicKeyAlgorithm(val algorithmId: Int) {
/** /**
* RSA with usage encryption. * RSA with usage encryption.
* *
* @deprecated see <a href="https://tools.ietf.org/html/rfc4880#section-13.5">Deprecation * @deprecated see [Deprecation notice](https://tools.ietf.org/html/rfc4880#section-13.5)
* notice</a>
*/ */
@Deprecated("RSA_ENCRYPT is deprecated in favor of RSA_GENERAL", ReplaceWith("RSA_GENERAL")) @Deprecated("RSA_ENCRYPT is deprecated in favor of RSA_GENERAL", ReplaceWith("RSA_GENERAL"))
RSA_ENCRYPT(2), RSA_ENCRYPT(2),
@ -34,8 +33,7 @@ enum class PublicKeyAlgorithm(val algorithmId: Int) {
/** /**
* RSA with usage of creating signatures. * RSA with usage of creating signatures.
* *
* @deprecated see <a href="https://tools.ietf.org/html/rfc4880#section-13.5">Deprecation * @deprecated see [Deprecation notice](https://tools.ietf.org/html/rfc4880#section-13.5)
* notice</a>
*/ */
@Deprecated("RSA_SIGN is deprecated in favor of RSA_GENERAL", ReplaceWith("RSA_GENERAL")) @Deprecated("RSA_SIGN is deprecated in favor of RSA_GENERAL", ReplaceWith("RSA_GENERAL"))
RSA_SIGN(3), RSA_SIGN(3),
@ -55,8 +53,7 @@ enum class PublicKeyAlgorithm(val algorithmId: Int) {
/** /**
* ElGamal General. * ElGamal General.
* *
* @deprecated see <a href="https://tools.ietf.org/html/rfc4880#section-13.8">Deprecation * @deprecated see [Deprecation notice](https://tools.ietf.org/html/rfc4880#section-13.8)
* notice</a>
*/ */
@Deprecated("ElGamal is deprecated") ELGAMAL_GENERAL(20), @Deprecated("ElGamal is deprecated") ELGAMAL_GENERAL(20),

View file

@ -337,8 +337,7 @@ class MessageMetadata(val message: Message) {
* decrypted file under its original filename, but since this field is not necessarily part of * decrypted file under its original filename, but since this field is not necessarily part of
* the signed data of a message, usage of this field is discouraged. * the signed data of a message, usage of this field is discouraged.
* *
* @see <a href="https://www.rfc-editor.org/rfc/rfc4880#section-5.9">RFC4880 §5.9. Literal Data * @see [RFC4880 §5.9. Literal Data Packet](https://www.rfc-editor.org/rfc/rfc4880#section-5.9)
* Packet</a>
*/ */
val filename: String? = findLiteralData()?.fileName val filename: String? = findLiteralData()?.fileName
@ -355,8 +354,7 @@ class MessageMetadata(val message: Message) {
* the modification date of a decrypted file, but since this field is not necessarily part of * the modification date of a decrypted file, but since this field is not necessarily part of
* the signed data, its use is discouraged. * the signed data, its use is discouraged.
* *
* @see <a href="https://www.rfc-editor.org/rfc/rfc4880#section-5.9">RFC4880 §5.9. Literal Data * @see [RFC4880 §5.9. Literal Data Packet](https://www.rfc-editor.org/rfc/rfc4880#section-5.9)
* Packet</a>
*/ */
val modificationDate: Date? = findLiteralData()?.modificationDate val modificationDate: Date? = findLiteralData()?.modificationDate
@ -365,8 +363,7 @@ class MessageMetadata(val message: Message) {
* binary data, ...) the data has. Since this field is not necessarily part of the signed data * binary data, ...) the data has. Since this field is not necessarily part of the signed data
* of a message, its usage is discouraged. * of a message, its usage is discouraged.
* *
* @see <a href="https://www.rfc-editor.org/rfc/rfc4880#section-5.9">RFC4880 §5.9. Literal Data * @see [RFC4880 §5.9. Literal Data Packet](https://www.rfc-editor.org/rfc/rfc4880#section-5.9)
* Packet</a>
*/ */
val literalDataEncoding: StreamEncoding? = findLiteralData()?.format val literalDataEncoding: StreamEncoding? = findLiteralData()?.format
@ -459,8 +456,8 @@ class MessageMetadata(val message: Message) {
* Outermost OpenPGP Message structure. * Outermost OpenPGP Message structure.
* *
* @param cleartextSigned whether the message is using the Cleartext Signature Framework * @param cleartextSigned whether the message is using the Cleartext Signature Framework
* @see <a href="https://www.rfc-editor.org/rfc/rfc4880#section-7">RFC4880 §7. Cleartext * @see
* Signature Framework</a> * [RFC4880 §7. Cleartext Signature Framework](https://www.rfc-editor.org/rfc/rfc4880#section-7)
*/ */
class Message(var cleartextSigned: Boolean = false) : Layer(0) { class Message(var cleartextSigned: Boolean = false) : Layer(0) {
fun setCleartextSigned() = apply { cleartextSigned = true } fun setCleartextSigned() = apply { cleartextSigned = true }
@ -499,7 +496,7 @@ class MessageMetadata(val message: Message) {
/** /**
* Encrypted Data. * Encrypted Data.
* *
* @param algorithm symmetric key algorithm used to encrypt the packet. * @param mechanism mechanism used to encrypt the packet.
* @param depth nesting depth at which this packet was encountered. * @param depth nesting depth at which this packet was encountered.
*/ */
class EncryptedData(val mechanism: MessageEncryptionMechanism, depth: Int) : class EncryptedData(val mechanism: MessageEncryptionMechanism, depth: Int) :

View file

@ -30,10 +30,10 @@ const val BUFFER_SIZE = 1 shl 9
* OutputStream that produces an OpenPGP message. The message can be encrypted, signed, or both, * OutputStream that produces an OpenPGP message. The message can be encrypted, signed, or both,
* depending on its configuration. * depending on its configuration.
* *
* This class is based upon Jens Neuhalfen's Bouncy-GPG PGPEncryptingStream. * This class was originally based upon Jens Neuhalfen's Bouncy-GPG PGPEncryptingStream.
* *
* @see <a * @see
* href="https://github.com/neuhalje/bouncy-gpg/blob/master/src/main/java/name/neuhalfen/projects/crypto/bouncycastle/openpgp/encrypting/PGPEncryptingStream.java">Source</a> * [PGPEncryptingStream](https://github.com/neuhalje/bouncy-gpg/blob/master/src/main/java/name/neuhalfen/projects/crypto/bouncycastle/openpgp/encrypting/PGPEncryptingStream.java)
*/ */
class EncryptionStream( class EncryptionStream(
private var outermostStream: OutputStream, private var outermostStream: OutputStream,

View file

@ -180,8 +180,8 @@ class ProducerOptions(
* *
* @param encoding encoding * @param encoding encoding
* @return this * @return this
* @see <a href="https://datatracker.ietf.org/doc/html/rfc4880#section-5.9">RFC4880 §5.9. * @see
* Literal Data Packet</a> * [RFC4880 §5.9. Literal Data Packet](https://datatracker.ietf.org/doc/html/rfc4880#section-5.9)
* @deprecated options other than the default value of [StreamEncoding.BINARY] are discouraged. * @deprecated options other than the default value of [StreamEncoding.BINARY] are discouraged.
*/ */
@Deprecated("Options other than BINARY are discouraged.") @Deprecated("Options other than BINARY are discouraged.")

View file

@ -32,8 +32,8 @@ abstract class OpenPgpFingerprint : CharSequence, Comparable<OpenPgpFingerprint>
* fingerprint, but we don't care, since V3 is deprecated. * fingerprint, but we don't care, since V3 is deprecated.
* *
* @return key id * @return key id
* @see <a href="https://tools.ietf.org/html/rfc4880#section-12.2"> RFC-4880 §12.2: Key IDs and * @see
* Fingerprints</a> * [RFC-4880 §12.2: Key IDs and Fingerprints](https://tools.ietf.org/html/rfc4880#section-12.2)
*/ */
abstract val keyId: Long abstract val keyId: Long

View file

@ -14,7 +14,7 @@ import org.pgpainless.algorithm.SymmetricKeyAlgorithm
* @param encryptionAlgorithm encryption algorithm * @param encryptionAlgorithm encryption algorithm
* @param hashAlgorithm hash algorithm * @param hashAlgorithm hash algorithm
* @param s2kCount encoded (!) s2k iteration count * @param s2kCount encoded (!) s2k iteration count
* @see <a href="https://www.rfc-editor.org/rfc/rfc4880#section-3.7.1.3">Encoding Formula</a> * @see [Encoding Formula](https://www.rfc-editor.org/rfc/rfc4880#section-3.7.1.3)
*/ */
data class KeyRingProtectionSettings( data class KeyRingProtectionSettings(
val encryptionAlgorithm: SymmetricKeyAlgorithm, val encryptionAlgorithm: SymmetricKeyAlgorithm,

View file

@ -19,11 +19,9 @@ import org.pgpainless.key.protection.fixes.S2KUsageFix.Companion.replaceUsageChe
* method [replaceUsageChecksumWithUsageSha1] ensures that such keys are encrypted using S2K usage * method [replaceUsageChecksumWithUsageSha1] ensures that such keys are encrypted using S2K usage
* [SecretKeyPacket.USAGE_SHA1] instead. * [SecretKeyPacket.USAGE_SHA1] instead.
* *
* @see <a href="https://github.com/pgpainless/pgpainless/issues/176">Related PGPainless Bug * @see [Related PGPainless Bug Report](https://github.com/pgpainless/pgpainless/issues/176)
* Report</a> * @see [Related PGPainless Feature Request](https://github.com/pgpainless/pgpainless/issues/178)
* @see <a href="https://github.com/pgpainless/pgpainless/issues/178">Related PGPainless Feature * @see [Related upstream BC bug report](https://github.com/bcgit/bc-java/issues/1020)
* Request</a>
* @see <a href="https://github.com/bcgit/bc-java/issues/1020">Related upstream BC bug report</a>
*/ */
class S2KUsageFix { class S2KUsageFix {
@ -39,7 +37,6 @@ class S2KUsageFix {
* @param skipKeysWithMissingPassphrase if set to true, missing subkey passphrases will * @param skipKeysWithMissingPassphrase if set to true, missing subkey passphrases will
* cause the subkey to stay unaffected. * cause the subkey to stay unaffected.
* @return fixed key ring * @return fixed key ring
* @throws PGPException in case of a PGP error.
*/ */
@JvmStatic @JvmStatic
@JvmOverloads @JvmOverloads

View file

@ -24,7 +24,7 @@ import org.pgpainless.exception.KeyIntegrityException
* modified public key in combination with the unmodified secret key material can then lead to the * modified public key in combination with the unmodified secret key material can then lead to the
* extraction of secret key parameters via weakly crafted messages. * extraction of secret key parameters via weakly crafted messages.
* *
* @see <a href="https://www.kopenpgp.com/">Key Overwriting (KO) Attacks against OpenPGP</a> * @see [Key Overwriting (KO) Attacks against OpenPGP](https://www.kopenpgp.com/)
*/ */
class PublicKeyParameterValidationUtil { class PublicKeyParameterValidationUtil {
@ -153,13 +153,13 @@ class PublicKeyParameterValidationUtil {
/** /**
* Validate ElGamal public key parameters. * Validate ElGamal public key parameters.
* *
* Original implementation by the openpgpjs authors: <a * Original implementation by the openpgpjs authors:
* href="https://github.com/openpgpjs/openpgpjs/blob/main/src/crypto/public_key/elgamal.js#L76-L143>OpenPGP.js
* source</a>
* *
* @param secretKey secret key * @param secretKey secret key
* @param publicKey public key * @param publicKey public key
* @return true if supposedly valid, false if invalid * @return true if supposedly valid, false if invalid
* @see
* [OpenPGP.js source](https://github.com/openpgpjs/openpgpjs/blob/main/src/crypto/public_key/elgamal.js#L76-L143)
*/ */
@JvmStatic @JvmStatic
@Throws(KeyIntegrityException::class) @Throws(KeyIntegrityException::class)

View file

@ -136,8 +136,8 @@ class UserId internal constructor(name: String?, comment: String?, email: String
* *
* @param string user-id * @param string user-id
* @return parsed UserId object * @return parsed UserId object
* @see <a href="https://www.rfc-editor.org/rfc/rfc5322#page-16">RFC5322 §3.4. Address * @see
* Specification</a> * [RFC5322 §3.4. Address Specification](https://www.rfc-editor.org/rfc/rfc5322#page-16)
*/ */
@JvmStatic @JvmStatic
fun parse(string: String): UserId { fun parse(string: String): UserId {

View file

@ -354,12 +354,10 @@ class Policy(
* problems to have a strength of at least 2000 bits. * problems to have a strength of at least 2000 bits.
* *
* @return default algorithm policy * @return default algorithm policy
* @see <a * @see
* href="https://www.bsi.bund.de/SharedDocs/Downloads/EN/BSI/Publications/TechGuidelines/TG02102/BSI-TR-02102-1.pdf">BSI - * [BSI - Technical Guideline - Cryptographic Mechanisms: Recommendations and Key Lengths (2021-01)](https://www.bsi.bund.de/SharedDocs/Downloads/EN/BSI/Publications/TechGuidelines/TG02102/BSI-TR-02102-1.pdf)
* Technical Guideline - Cryptographic Mechanisms: Recommendations and Key Lengths * @see
* (2021-01)</a> * [BlueKrypt | Cryptographic Key Length Recommendation](https://www.keylength.com/)
* @see <a href="https://www.keylength.com/">BlueKrypt | Cryptographic Key Length
* Recommendation</a>
*/ */
@JvmStatic @JvmStatic
fun bsi2021PublicKeyAlgorithmPolicy() = fun bsi2021PublicKeyAlgorithmPolicy() =

View file

@ -283,8 +283,8 @@ class ArmorUtils {
* *
* @param armor armored output stream * @param armor armored output stream
* @param hashAlgorithm hash algorithm * @param hashAlgorithm hash algorithm
* @see <a href="https://datatracker.ietf.org/doc/html/rfc4880#section-6.2"> RFC 4880 - * @see
* OpenPGP Message Format §6.2. Forming ASCII Armor</a> * [RFC 4880 - OpenPGP Message Format §6.2. Forming ASCII Armor](https://datatracker.ietf.org/doc/html/rfc4880#section-6.2)
*/ */
@JvmStatic @JvmStatic
@Deprecated( @Deprecated(
@ -298,8 +298,8 @@ class ArmorUtils {
* *
* @param armor armored output stream * @param armor armored output stream
* @param comment free-text comment * @param comment free-text comment
* @see <a href="https://datatracker.ietf.org/doc/html/rfc4880#section-6.2"> RFC 4880 - * @see
* OpenPGP Message Format §6.2. Forming ASCII Armor</a> * [RFC 4880 - OpenPGP Message Format §6.2. Forming ASCII Armor](https://datatracker.ietf.org/doc/html/rfc4880#section-6.2)
*/ */
@JvmStatic @JvmStatic
@Deprecated( @Deprecated(
@ -313,8 +313,8 @@ class ArmorUtils {
* *
* @param armor armored output stream * @param armor armored output stream
* @param messageId message id * @param messageId message id
* @see <a href="https://datatracker.ietf.org/doc/html/rfc4880#section-6.2"> RFC 4880 - * @see
* OpenPGP Message Format §6.2. Forming ASCII Armor</a> * [RFC 4880 - OpenPGP Message Format §6.2. Forming ASCII Armor](https://datatracker.ietf.org/doc/html/rfc4880#section-6.2)
*/ */
@JvmStatic @JvmStatic
@Deprecated( @Deprecated(