cookie-signature

Sign and unsign cookies

MIT 13 个版本
安装
npm install cookie-signature
yarn add cookie-signature
pnpm add cookie-signature
bun add cookie-signature
README

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.

版本列表
1.2.2 2024-10-29
1.2.1 2023-02-27
1.2.0 2022-02-17
1.1.0 2018-01-19
1.0.7 2023-04-12
1.0.6 2015-02-03
1.0.5 2014-09-05
1.0.4 2014-06-25
1.0.3 2014-01-29
1.0.2 2014-01-29
1.0.1 2013-04-15
1.0.0 2013-04-12
0.0.1 2012-10-15