Skip to content

Commit e23fed1

Browse files
nikitakovaliov92iText-CI
authored andcommitted
Fix javadoc warnings in sign module
DEVSIX-5133 Autoported commit. Original commit hash: [e5a5dfd26]
1 parent 1371435 commit e23fed1

File tree

5 files changed

+38
-9
lines changed

5 files changed

+38
-9
lines changed

itext/itext.sign/itext/signatures/PdfPKCS7.cs

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,12 @@ public virtual int GetSigningInfoVersion() {
494494

495495
private PdfName filterSubtype;
496496

497-
/// <summary>Getter for the ID of the digest algorithm, e.g. "2.16.840.1.101.3.4.2.1"</summary>
497+
/// <summary>Getter for the ID of the digest algorithm, e.g. "2.16.840.1.101.3.4.2.1".</summary>
498+
/// <remarks>
499+
/// Getter for the ID of the digest algorithm, e.g. "2.16.840.1.101.3.4.2.1".
500+
/// See ISO-32000-1, section 12.8.3.3 PKCS#7 Signatures as used in ISO 32000
501+
/// </remarks>
502+
/// <returns>the ID of the digest algorithm</returns>
498503
public virtual String GetDigestAlgorithmOid() {
499504
return digestAlgorithmOid;
500505
}
@@ -509,12 +514,21 @@ public virtual String GetHashAlgorithm() {
509514
/// <summary>The encryption algorithm.</summary>
510515
private String digestEncryptionAlgorithmOid;
511516

512-
/// <summary>Getter for the digest encryption algorithm</summary>
517+
/// <summary>Getter for the digest encryption algorithm.</summary>
518+
/// <remarks>
519+
/// Getter for the digest encryption algorithm.
520+
/// See ISO-32000-1, section 12.8.3.3 PKCS#7 Signatures as used in ISO 32000
521+
/// </remarks>
522+
/// <returns>the encryption algorithm</returns>
513523
public virtual String GetDigestEncryptionAlgorithmOid() {
514524
return digestEncryptionAlgorithmOid;
515525
}
516526

517527
/// <summary>Get the algorithm used to calculate the message digest, e.g. "SHA1withRSA".</summary>
528+
/// <remarks>
529+
/// Get the algorithm used to calculate the message digest, e.g. "SHA1withRSA".
530+
/// See ISO-32000-1, section 12.8.3.3 PKCS#7 Signatures as used in ISO 32000
531+
/// </remarks>
518532
/// <returns>the algorithm used to calculate the message digest</returns>
519533
public virtual String GetDigestAlgorithm() {
520534
return GetHashAlgorithm() + "with" + GetEncryptionAlgorithm();
@@ -835,7 +849,6 @@ private Asn1EncodableVector BuildUnauthenticatedAttributes(byte[] timeStampToken
835849
/// <see cref="GetEncodedPKCS7(byte[])"/>.
836850
/// <para />
837851
/// A simple example:
838-
/// <para />
839852
/// <pre>
840853
/// Calendar cal = Calendar.getInstance();
841854
/// PdfPKCS7 pk7 = new PdfPKCS7(key, chain, null, "SHA1", null, false);
@@ -877,7 +890,6 @@ public virtual byte[] GetAuthenticatedAttributeBytes(byte[] secondDigest, byte[]
877890
/// <see cref="GetEncodedPKCS7(byte[])"/>.
878891
/// <para />
879892
/// A simple example:
880-
/// <para />
881893
/// <pre>
882894
/// Calendar cal = Calendar.getInstance();
883895
/// PdfPKCS7 pk7 = new PdfPKCS7(key, chain, null, "SHA1", null, false);
@@ -1306,7 +1318,8 @@ public virtual DateTime GetTimeStampDate() {
13061318
return SignUtils.GetTimeStampDate(timeStampToken);
13071319
}
13081320

1309-
/// <summary>Returns the filter subtype.</summary>
1321+
/// <summary>Getter for the filter subtype.</summary>
1322+
/// <returns>the filter subtype</returns>
13101323
public virtual PdfName GetFilterSubtype() {
13111324
return filterSubtype;
13121325
}

itext/itext.sign/itext/signatures/PdfSignature.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,11 @@ public virtual void SetContents(byte[] contents) {
142142
}
143143

144144
/// <summary>Gets the /Contents entry value.</summary>
145+
/// <remarks>
146+
/// Gets the /Contents entry value.
147+
/// See ISO 32000-1 12.8.1, Table 252 – Entries in a signature dictionary.
148+
/// </remarks>
149+
/// <returns>the signature content</returns>
145150
public virtual PdfString GetContents() {
146151
return GetPdfObject().GetAsString(PdfName.Contents);
147152
}
@@ -153,6 +158,11 @@ public virtual void SetCert(byte[] cert) {
153158
}
154159

155160
/// <summary>Gets the /Cert entry value of this signature.</summary>
161+
/// <remarks>
162+
/// Gets the /Cert entry value of this signature.
163+
/// See ISO 32000-1 12.8.1, Table 252 – Entries in a signature dictionary.
164+
/// </remarks>
165+
/// <returns>the signature cert</returns>
156166
public virtual PdfString GetCert() {
157167
return GetPdfObject().GetAsString(PdfName.Cert);
158168
}

itext/itext.sign/itext/signatures/PdfSignatureAppearance.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -479,8 +479,8 @@ public virtual bool IsInvisible() {
479479

480480
/// <summary>Constructs appearance (top-level) for a signature.</summary>
481481
/// <returns>a top-level signature appearance</returns>
482-
/// <seealso><a href="https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/ppkappearances.pdf">
483-
/// * Adobe Pdf Digital Signature Appearances</a> for further details</seealso>
482+
/// <seealso><a href="https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/ppkappearances.pdf">Adobe Pdf Digital
483+
/// * Signature Appearances</a></seealso>
484484
protected internal virtual PdfFormXObject GetAppearance() {
485485
PdfCanvas canvas;
486486
if (IsInvisible()) {

itext/itext.sign/itext/signatures/SignaturePermissions.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,19 +62,23 @@ public class FieldLock {
6262
/// <summary>An array of PdfString values with fieldnames</summary>
6363
internal PdfArray fields;
6464

65-
/// <summary>Creates a FieldLock instance</summary>
65+
/// <summary>Creates a FieldLock instance.</summary>
66+
/// <param name="action">indicates the set of fields that should be locked</param>
67+
/// <param name="fields">an array of text strings containing field names</param>
6668
public FieldLock(SignaturePermissions _enclosing, PdfName action, PdfArray fields) {
6769
this._enclosing = _enclosing;
6870
this.action = action;
6971
this.fields = fields;
7072
}
7173

7274
/// <summary>Getter for the field lock action.</summary>
75+
/// <returns>the action of field lock dictionary</returns>
7376
public virtual PdfName GetAction() {
7477
return this.action;
7578
}
7679

7780
/// <summary>Getter for the fields involved in the lock action.</summary>
81+
/// <returns>the fields of field lock dictionary</returns>
7882
public virtual PdfArray GetFields() {
7983
return this.fields;
8084
}
@@ -104,6 +108,8 @@ public override String ToString() {
104108
/// in a signature dictionary as well as some of the permissions
105109
/// defined by the signature.
106110
/// </summary>
111+
/// <param name="sigDict">the signature dictionary</param>
112+
/// <param name="previous">the signature permissions</param>
107113
public SignaturePermissions(PdfDictionary sigDict, SignaturePermissions previous) {
108114
if (previous != null) {
109115
annotationsAllowed &= previous.IsAnnotationsAllowed();

port-hash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
91bea8fa7cbe39088fe8761c5eb979eb1c5947d2
1+
e5a5dfd2662b8205bfb22eed87f6720ea319d1a9

0 commit comments

Comments
 (0)