|
há 1 semana atrás | |
---|---|---|
.. | ||
History.md | há 1 semana atrás | |
LICENSE | há 1 semana atrás | |
Readme.md | há 1 semana atrás | |
index.js | há 1 semana atrás | |
package.json | há 1 semana atrás |
Sign and unsign cookies.
var cookie = require('cookie-signature');
var val = cookie.sign('hello', 'tobiiscool');
val.should.equal('hello.DGDUkGlIkCzPz+C0B064FNgHdEjox7ch8tOBGslZ5QI');
var val = cookie.sign('hello', 'tobiiscool');
cookie.unsign(val, 'tobiiscool').should.equal('hello');
cookie.unsign(val, 'luna').should.be.false;
MIT.
See LICENSE file for details.