servidor funciona, gpio desabilitat

This commit is contained in:
nau
2016-06-21 18:42:57 +02:00
parent b5a55ed6b1
commit 4825f68edf
874 changed files with 109057 additions and 0 deletions

42
node_modules/cookie-signature/index.js generated vendored Executable file
View File

@@ -0,0 +1,42 @@
/**
* Module dependencies.
*/
var crypto = require('crypto');
/**
* Sign the given `val` with `secret`.
*
* @param {String} val
* @param {String} secret
* @return {String}
* @api private
*/
exports.sign = function(val, secret){
if ('string' != typeof val) throw new TypeError('cookie required');
if ('string' != typeof secret) throw new TypeError('secret required');
return val + '.' + crypto
.createHmac('sha256', secret)
.update(val)
.digest('base64')
.replace(/\=+$/, '');
};
/**
* Unsign and decode the given `val` with `secret`,
* returning `false` if the signature is invalid.
*
* @param {String} val
* @param {String} secret
* @return {String|Boolean}
* @api private
*/
exports.unsign = function(val, secret){
if ('string' != typeof val) throw new TypeError('cookie required');
if ('string' != typeof secret) throw new TypeError('secret required');
var str = val.slice(0, val.lastIndexOf('.'));
return exports.sign(str, secret) == val ? str : false;
};