Skip to content

Commit

Permalink
fix comments
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick Flynn <patrick@chainguard.dev>
  • Loading branch information
Patrick Flynn committed Sep 12, 2022
1 parent ab4610a commit 00bc7f6
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions sigstore-java/src/main/java/dev/sigstore/encryption/Keys.java
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,11 @@ public static PublicKey parsePublicKey(byte[] keyBytes)
*
* {@see https://theupdateframework.github.io/specification/latest/index.html#role-role}
*
* @param contents
* @param scheme
* @return
* @throws NoSuchAlgorithmException
* @throws InvalidKeySpecException
* @param contents keyBytes
* @param scheme signing scheme
* @return java {link PublicKey}
* @throws NoSuchAlgorithmException if we don't support the scheme provided
* @throws InvalidKeySpecException if the public key material is invalid
*/
public static PublicKey constructTufPublicKey(byte[] contents, String scheme)
throws NoSuchAlgorithmException, InvalidKeySpecException {
Expand Down Expand Up @@ -148,8 +148,7 @@ public static PublicKey constructTufPublicKey(byte[] contents, String scheme)
throw new RuntimeException(e);
}

// code below just creates the public key from the bytes contained in publicK
// using the curve parameters (spec variable)
// code below just creates the public key from key contents using the curve parameters (spec variable)
ECNamedCurveSpec params =
new ECNamedCurveSpec("P-256", spec.getCurve(), spec.getG(), spec.getN());
ECPoint point = decodePoint(params.getCurve(), contents);
Expand Down

0 comments on commit 00bc7f6

Please sign in to comment.