gui/ui/node_modules.bak/cookie-signature
Snider fad16c8c76
Some checks failed
Security Scan / security (push) Failing after 34s
Test / test (push) Failing after 1m44s
chore: sync workspace dependencies
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-15 15:44:56 +00:00
..
History.md chore: sync workspace dependencies 2026-03-15 15:44:56 +00:00
index.js chore: sync workspace dependencies 2026-03-15 15:44:56 +00:00
LICENSE chore: sync workspace dependencies 2026-03-15 15:44:56 +00:00
package.json chore: sync workspace dependencies 2026-03-15 15:44:56 +00:00
Readme.md chore: sync workspace dependencies 2026-03-15 15:44:56 +00: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.