forked from TrueCloudLab/frostfs-sdk-java
parent
c9a54d56fb
commit
23bbe08893
70 changed files with 1375 additions and 587 deletions
25
models/src/main/java/info/frostfs/sdk/dto/CheckSum.java
Normal file
25
models/src/main/java/info/frostfs/sdk/dto/CheckSum.java
Normal file
|
@ -0,0 +1,25 @@
|
|||
package info.frostfs.sdk.dto;
|
||||
|
||||
import info.frostfs.sdk.Helper;
|
||||
|
||||
public class CheckSum {
|
||||
// type is always Sha256
|
||||
public byte[] hash;
|
||||
|
||||
public CheckSum(byte[] content) {
|
||||
this.hash = Helper.getSha256(content);
|
||||
}
|
||||
|
||||
public byte[] getHash() {
|
||||
return hash;
|
||||
}
|
||||
|
||||
public void setHash(byte[] hash) {
|
||||
this.hash = hash;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Helper.getHexString(hash);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue