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.
*
* @deprecated see <a href="https://tools.ietf.org/html/rfc4880#section-13.5">Deprecation
* notice</a>
* @deprecated see [Deprecation notice](https://tools.ietf.org/html/rfc4880#section-13.5)
*/
@Deprecated("RSA_ENCRYPT is deprecated in favor of RSA_GENERAL", ReplaceWith("RSA_GENERAL"))
RSA_ENCRYPT(2),
@ -34,8 +33,7 @@ enum class PublicKeyAlgorithm(val algorithmId: Int) {
/**
* RSA with usage of creating signatures.
*
* @deprecated see <a href="https://tools.ietf.org/html/rfc4880#section-13.5">Deprecation
* notice</a>
* @deprecated see [Deprecation notice](https://tools.ietf.org/html/rfc4880#section-13.5)
*/
@Deprecated("RSA_SIGN is deprecated in favor of RSA_GENERAL", ReplaceWith("RSA_GENERAL"))
RSA_SIGN(3),
@ -55,8 +53,7 @@ enum class PublicKeyAlgorithm(val algorithmId: Int) {
/**
* ElGamal General.
*
* @deprecated see <a href="https://tools.ietf.org/html/rfc4880#section-13.8">Deprecation
* notice</a>
* @deprecated see [Deprecation notice](https://tools.ietf.org/html/rfc4880#section-13.8)
*/
@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
* 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
* Packet</a>
* @see [RFC4880 §5.9. Literal Data Packet](https://www.rfc-editor.org/rfc/rfc4880#section-5.9)
*/
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 signed data, its use is discouraged.
*
* @see <a href="https://www.rfc-editor.org/rfc/rfc4880#section-5.9">RFC4880 §5.9. Literal Data
* Packet</a>
* @see [RFC4880 §5.9. Literal Data Packet](https://www.rfc-editor.org/rfc/rfc4880#section-5.9)
*/
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
* 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
* Packet</a>
* @see [RFC4880 §5.9. Literal Data Packet](https://www.rfc-editor.org/rfc/rfc4880#section-5.9)
*/
val literalDataEncoding: StreamEncoding? = findLiteralData()?.format
@ -459,8 +456,8 @@ class MessageMetadata(val message: Message) {
* Outermost OpenPGP Message structure.
*
* @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
* Signature Framework</a>
* @see
* [RFC4880 §7. Cleartext Signature Framework](https://www.rfc-editor.org/rfc/rfc4880#section-7)
*/
class Message(var cleartextSigned: Boolean = false) : Layer(0) {
fun setCleartextSigned() = apply { cleartextSigned = true }
@ -499,7 +496,7 @@ class MessageMetadata(val message: Message) {
/**
* 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.
*/
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,
* 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
* href="https://github.com/neuhalje/bouncy-gpg/blob/master/src/main/java/name/neuhalfen/projects/crypto/bouncycastle/openpgp/encrypting/PGPEncryptingStream.java">Source</a>
* @see
* [PGPEncryptingStream](https://github.com/neuhalje/bouncy-gpg/blob/master/src/main/java/name/neuhalfen/projects/crypto/bouncycastle/openpgp/encrypting/PGPEncryptingStream.java)
*/
class EncryptionStream(
private var outermostStream: OutputStream,

View file

@ -180,8 +180,8 @@ class ProducerOptions(
*
* @param encoding encoding
* @return this
* @see <a href="https://datatracker.ietf.org/doc/html/rfc4880#section-5.9">RFC4880 §5.9.
* Literal Data Packet</a>
* @see
* [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 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.
*
* @return key id
* @see <a href="https://tools.ietf.org/html/rfc4880#section-12.2"> RFC-4880 §12.2: Key IDs and
* Fingerprints</a>
* @see
* [RFC-4880 §12.2: Key IDs and Fingerprints](https://tools.ietf.org/html/rfc4880#section-12.2)
*/
abstract val keyId: Long

View file

@ -14,7 +14,7 @@ import org.pgpainless.algorithm.SymmetricKeyAlgorithm
* @param encryptionAlgorithm encryption algorithm
* @param hashAlgorithm hash algorithm
* @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(
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
* [SecretKeyPacket.USAGE_SHA1] instead.
*
* @see <a href="https://github.com/pgpainless/pgpainless/issues/176">Related PGPainless Bug
* Report</a>
* @see <a href="https://github.com/pgpainless/pgpainless/issues/178">Related PGPainless Feature
* Request</a>
* @see <a href="https://github.com/bcgit/bc-java/issues/1020">Related upstream BC bug report</a>
* @see [Related PGPainless Bug Report](https://github.com/pgpainless/pgpainless/issues/176)
* @see [Related PGPainless Feature Request](https://github.com/pgpainless/pgpainless/issues/178)
* @see [Related upstream BC bug report](https://github.com/bcgit/bc-java/issues/1020)
*/
class S2KUsageFix {
@ -39,7 +37,6 @@ class S2KUsageFix {
* @param skipKeysWithMissingPassphrase if set to true, missing subkey passphrases will
* cause the subkey to stay unaffected.
* @return fixed key ring
* @throws PGPException in case of a PGP error.
*/
@JvmStatic
@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
* 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 {
@ -153,13 +153,13 @@ class PublicKeyParameterValidationUtil {
/**
* Validate ElGamal public key parameters.
*
* Original implementation by the openpgpjs authors: <a
* href="https://github.com/openpgpjs/openpgpjs/blob/main/src/crypto/public_key/elgamal.js#L76-L143>OpenPGP.js
* source</a>
* Original implementation by the openpgpjs authors:
*
* @param secretKey secret key
* @param publicKey public key
* @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
@Throws(KeyIntegrityException::class)

View file

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

View file

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

View file

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