Refactored Sha256Hash API:

- depracated constructors
- wrap methods to wrap given hash values in a new instance
- of/twiceOf methods to calculate hash values in a new instance
- hash/hashTwice to calculate hash values and return the raw bytes
This commit is contained in:
Amichai Rothman
2015-06-24 01:16:04 +03:00
committed by Mike Hearn
parent 0a94a30a6b
commit faf92971dd
44 changed files with 173 additions and 136 deletions

View File

@@ -116,7 +116,7 @@ public class BuildCheckpoints {
buffer.position(0);
}
dataOutputStream.close();
Sha256Hash checkpointsHash = new Sha256Hash(digest.digest());
Sha256Hash checkpointsHash = Sha256Hash.wrap(digest.digest());
System.out.println("Hash of checkpoints data is " + checkpointsHash);
digestOutputStream.close();
fileOutputStream.close();