Cygni_backend/node_modules/cookie-signature
hardik 1ce418b840 first commit 2025-07-10 12:05:29 +05:30
..
History.md first commit 2025-07-10 12:05:29 +05:30
LICENSE first commit 2025-07-10 12:05:29 +05:30
Readme.md first commit 2025-07-10 12:05:29 +05:30
index.js first commit 2025-07-10 12:05:29 +05:30
package.json first commit 2025-07-10 12:05:29 +05:30

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.