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

1.2.1 • 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

26,849,284

Version

1.2.1

License

MIT

Unpacked Size

4.7 kB

Total Files

5

Last publish

Collaborators

  • natevw
  • tjholowaychuk
  • dougwilson