DDI supports sha256 (#869)
* Add SHA256 file hash to ddi GET outputs Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com> * Integrate review findings for SHA256 changes Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com> * Renamed hashes to base16hases in store() parameters Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com> * Added missing javadoc according to sonarqube findings Signed-off-by: Alexander Dobler <alexander.dobler3@bosch-si.com>
This commit is contained in:
committed by
Dominic Schabel
parent
fba6cf9787
commit
bde3548846
@@ -8,6 +8,8 @@
|
||||
*/
|
||||
package org.eclipse.hawkbit.ddi.json.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
/**
|
||||
@@ -23,6 +25,10 @@ public class DdiArtifactHash {
|
||||
@JsonProperty
|
||||
private String md5;
|
||||
|
||||
@JsonProperty
|
||||
@JsonInclude(Include.NON_NULL)
|
||||
private String sha256;
|
||||
|
||||
/**
|
||||
* Default constructor.
|
||||
*/
|
||||
@@ -34,11 +40,16 @@ public class DdiArtifactHash {
|
||||
* Public constructor.
|
||||
*
|
||||
* @param sha1
|
||||
* sha1 hash of the artifact
|
||||
* @param md5
|
||||
* md5 hash of the artifact
|
||||
* @param sha256
|
||||
* sha256 hash of the artifact
|
||||
*/
|
||||
public DdiArtifactHash(final String sha1, final String md5) {
|
||||
public DdiArtifactHash(final String sha1, final String md5, final String sha256) {
|
||||
this.sha1 = sha1;
|
||||
this.md5 = md5;
|
||||
this.sha256 = sha256;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -55,4 +66,10 @@ public class DdiArtifactHash {
|
||||
return md5;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the sha256
|
||||
*/
|
||||
public String getSha256() {
|
||||
return sha256;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user