"use strict";

module.exports = function(size){

    var crypto = require('crypto');

    return crypto.createHash('sha512').update(
        crypto.randomBytes(size)
    ).digest('base64');

};

@@ -108,11 +108,11 @@
 ateH
-ash
+mac
 ('sh
@@ -116,16 +116,39 @@
 'sha512'
+, new Date().toString()
 ).update

Change encoding algorithm for creating tokens