Preparing for micro workers

This commit is contained in:
Thomas FORGIONE
2015-09-29 15:46:31 +02:00
parent 35a8055fc6
commit bee440668c
3 changed files with 366 additions and 371 deletions

8
lib/vcode.js Normal file
View File

@@ -0,0 +1,8 @@
var hash = require('sha256');
var secretKey = require('../private.js').microSecretKey;
module.exports = function(campaignId, workerId) {
return 'mw-' + hash(campaignId + workerId + secretKey);
}