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.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.2.1
    669,300
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.7
    544,470
  • 1.2.1
    669,300
  • 1.2.0
    47,979
  • 1.1.0
    71,718
  • 1.0.6
    25,983,061
  • 1.0.5
    10,107
  • 1.0.4
    11,369
  • 1.0.3
    12,864
  • 1.0.2
    71
  • 1.0.1
    43,090
  • 1.0.0
    1,642
  • 0.0.1
    2,852

Package Sidebar

Install

npm i cookie-signature

Weekly Downloads

27,398,523

Version

1.2.1

License

MIT

Unpacked Size

4.7 kB

Total Files

5

Last publish

Collaborators

  • natevw
  • tjholowaychuk
  • dougwilson