3d-interface/server/lib/vcode.js

10 lines
250 B
JavaScript
Raw Normal View History

2015-09-29 15:46:31 +02:00
var hash = require('sha256');
var secretKey = require('../private.js').microSecretKey;
var campaignId = require('../private.js').microCampaignId;
2015-09-29 15:46:31 +02:00
module.exports = function(workerId) {
2015-09-29 15:46:31 +02:00
return 'mw-' + hash(campaignId + workerId + secretKey);
2015-10-06 16:58:04 +02:00
};