cookie-signature
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/cookie-signature package

1.2.2 • Public • Published

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.

Readme

Keywords

Package Sidebar

Install

npm i cookie-signature

Weekly Downloads

32,868,310

Version

1.2.2

License

MIT

Unpacked Size

4.99 kB

Total Files

5

Last publish

Collaborators

  • natevw
  • tjholowaychuk
  • dougwilson