@@ -175,6 +175,8 @@ public void setMessageDigest(byte[] digest) {
175175 * Sets the certificate that is used to sign.
176176 *
177177 * @param certificate the certificate that is used to sign
178+ *
179+ * @throws IOException if input-output exception occurs.
178180 */
179181 public void setSigningCertificate (X509Certificate certificate ) throws IOException {
180182 this .signerCertificate = certificate ;
@@ -200,6 +202,11 @@ public X509Certificate getSigningCertificate() {
200202 *
201203 * @param certificate the certificate that is used to sign
202204 * @param digestAlgorithmOid the oid of the digest algorithm to be added to the signed attributes
205+ *
206+ * @throws CertificateEncodingException if an encoding error occurs.
207+ * @throws NoSuchAlgorithmException when the algorithm is unknown.
208+ * @throws NoSuchProviderException when provider is unknown.
209+ * @throws IOException if input-output exception occurs.
203210 */
204211 public void setSigningCertificateAndAddToSignedAttributes (X509Certificate certificate , String digestAlgorithmOid )
205212 throws CertificateEncodingException , NoSuchAlgorithmException , NoSuchProviderException , IOException {
@@ -298,16 +305,18 @@ public void setSignatureAlgorithm(AlgorithmIdentifier algorithm) {
298305 }
299306
300307 /**
301- * Value 0 when no signerIdentifier is available
302- * Value 1 when signerIdentifier is of type issuerAndSerialNumber
303- * Value 3 when signerIdentifier is of type subjectKeyIdentifier
308+ * Value 0 when no signerIdentifier is available.
309+ * Value 1 when signerIdentifier is of type issuerAndSerialNumber.
310+ * Value 3 when signerIdentifier is of type subjectKeyIdentifier.
311+ *
312+ * @return CMS version.
304313 */
305314 public int getCmsVersion () {
306315 return 1 ;
307316 }
308317
309318 /**
310- * Optional
319+ * Optional.
311320 *
312321 * <p>
313322 * Attributes that should be part of the signed content
@@ -326,6 +335,8 @@ public int getCmsVersion() {
326335 * A message-digest attribute, having as its value the message
327336 * digest of the content. Section 11.2 defines the message-digest
328337 * attribute.
338+ *
339+ * @return collection of the signed attributes.
329340 */
330341 public Collection <Attribute > getSignedAttributes () {
331342 return Collections .unmodifiableCollection (signedAttributes );
0 commit comments