manfa940 14198d79d0 First commit 10 ماه پیش
..
History.md 14198d79d0 First commit 10 ماه پیش
LICENSE 14198d79d0 First commit 10 ماه پیش
Readme.md 14198d79d0 First commit 10 ماه پیش
index.js 14198d79d0 First commit 10 ماه پیش
package.json 14198d79d0 First commit 10 ماه پیش

Readme.md

cookie-signature

Sign and unsign cookies.

Example

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;

License

MIT.

See LICENSE file for details.