2015-09-29 15:46:31 +02:00
|
|
|
var hash = require('sha256');
|
|
|
|
var secretKey = require('../private.js').microSecretKey;
|
|
|
|
|
2015-09-29 17:22:48 +02:00
|
|
|
module.exports = function(workerId, campaignId) {
|
|
|
|
|
|
|
|
if (campaignId === undefined) {
|
|
|
|
|
|
|
|
return 'mw-dummyvcode';
|
|
|
|
|
|
|
|
}
|
2015-09-29 15:46:31 +02:00
|
|
|
|
|
|
|
return 'mw-' + hash(campaignId + workerId + secretKey);
|
|
|
|
|
|
|
|
}
|