-
Notifications
You must be signed in to change notification settings - Fork 200
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Parameterize hash function; continue to default to sha256 (#300)
* Parameterize hash function; continue to default to sha256 * Update plugin-management-library/src/main/java/io/jenkins/tools/pluginmanager/impl/PluginManager.java Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com> * Update README for hash function Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com>
- Loading branch information
Showing
11 changed files
with
118 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
...-management-library/src/main/java/io/jenkins/tools/pluginmanager/config/HashFunction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package io.jenkins.tools.pluginmanager.config; | ||
|
||
public enum HashFunction { | ||
SHA1("sha1"), | ||
SHA256("sha256"), | ||
SHA512("sha512"); | ||
|
||
private String hashFunctionName; | ||
|
||
HashFunction(String hashFunctionName) { | ||
this.hashFunctionName = hashFunctionName; | ||
} | ||
|
||
@Override | ||
public String toString(){ | ||
return hashFunctionName; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
...brary/src/main/java/io/jenkins/tools/pluginmanager/impl/UnsupportedChecksumException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package io.jenkins.tools.pluginmanager.impl; | ||
|
||
public class UnsupportedChecksumException extends RuntimeException { | ||
|
||
public UnsupportedChecksumException(String message) { | ||
super(message); | ||
} | ||
|
||
public UnsupportedChecksumException(String message, Throwable cause) { | ||
super(message, cause); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters