202502-Wms-NanTongYaChi/node_modules/cookie-signature
2025-07-18 13:24:53 +08:00
..
History.md 增加备份记录 2025-07-18 13:24:53 +08:00
index.js 增加备份记录 2025-07-18 13:24:53 +08:00
LICENSE 增加备份记录 2025-07-18 13:24:53 +08:00
package.json 增加备份记录 2025-07-18 13:24:53 +08:00
Readme.md 增加备份记录 2025-07-18 13:24:53 +08: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.