Skip to content

Commit

Permalink
Document new PGPSignatureGenerator constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
vanitasvitae committed Jul 12, 2024
1 parent 82d73b8 commit 4ed8a88
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public PGPSignatureGenerator(

/**
* Create a signature generator built on the passed in contentSignerBuilder.
* The produces signature version will match the version of the passed in signing key.
* The produced signature version will match the version of the passed in signing key.
*
* @param contentSignerBuilder builder to produce PGPContentSigner objects for generating signatures
* @param signingKey signing key
Expand All @@ -71,6 +71,15 @@ public PGPSignatureGenerator(
this(contentSignerBuilder, signingKey, signingKey.getVersion());
}

/**
* Create a signature generator built on the passed in contentSignerBuilder.
* The signature that is being produced will match the passed in signature version.
* NOTE: You cannot use a v6 signing key to produce signatures of any other version than 6.
*
* @param contentSignerBuilder builder to produce PGPContentSigner objects for generating signatures
* @param signingKey signing key
* @param signatureVersion version of the produced signature packet
*/
public PGPSignatureGenerator(
PGPContentSignerBuilder contentSignerBuilder,
PGPPublicKey signingKey,
Expand Down

0 comments on commit 4ed8a88

Please sign in to comment.