You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
277 B

5 years ago
5 years ago
  1. const Poseidon = require("./poseidon");
  2. const hash = Poseidon.createHash(6, 8, 57);
  3. exports.hash0 = function (left, right) {
  4. return hash([left, right]);
  5. };
  6. exports.hash1 = function(key, value) {
  7. return hash([key, value, Poseidon.F.one]);
  8. };
  9. exports.F = Poseidon.F;