EternalAI/node_modules/cookie-signature
chigulong 2a13044f12 Configure EternalAI project with Express server and deployment scripts 2026-06-20 18:13:44 +08:00
..
History.md Configure EternalAI project with Express server and deployment scripts 2026-06-20 18:13:44 +08:00
LICENSE Configure EternalAI project with Express server and deployment scripts 2026-06-20 18:13:44 +08:00
Readme.md Configure EternalAI project with Express server and deployment scripts 2026-06-20 18:13:44 +08:00
index.js Configure EternalAI project with Express server and deployment scripts 2026-06-20 18:13:44 +08:00
package.json Configure EternalAI project with Express server and deployment scripts 2026-06-20 18:13:44 +08:00

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.