zkt26/node_modules/cookie-signature
2026-03-22 12:47:16 +01:00
..
History.md final without readme 2026-03-22 12:47:16 +01:00
index.js final without readme 2026-03-22 12:47:16 +01:00
LICENSE final without readme 2026-03-22 12:47:16 +01:00
package.json final without readme 2026-03-22 12:47:16 +01:00
Readme.md final without readme 2026-03-22 12:47:16 +01:00

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.