Skip to content

Commit

Permalink
unit test setup
Browse files Browse the repository at this point in the history
  • Loading branch information
AnaDjokovic committed Mar 31, 2022
1 parent eec83d0 commit b725887
Show file tree
Hide file tree
Showing 4 changed files with 1,108 additions and 11,607 deletions.
14 changes: 14 additions & 0 deletions modules/CalculateHash.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
const { sha3_256 } = require('js-sha3');

/**
* Calculating data hash of dataset using sha3-256.
* Returns data hash value
@param dataset for which is calculated data hash
*/
function calculateDataHash(dataset) {
return `0x${sha3_256(dataset, null, 0)}`;
}

module.exports = {
calculateDataHash,
};
Loading

0 comments on commit b725887

Please sign in to comment.