Skip to content

Instantly share code, notes, and snippets.

@potluckgame
potluckgame / server.seeds.chain.js
Last active August 25, 2023 03:34
Potluck Server seed chain generator
const Bluebird = require('bluebird');
/**
* Create a `sha256` hash of the seed.
* @param {String} seed - Previous server `seed`
* @returns {String} `sha256` hash of the `seed`
*/
function createHash(seed) {
return crypto.createHash('sha256').update(seed).digest('hex');
}