@bwardrop/cookie-signature

1.2.0 • Public • Published

!!! WARNING !!!

This fork is not intended for use in production. It has been created to test the efficacy of supply chain security tools.

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 @bwardrop/cookie-signature

Weekly Downloads

1

Version

1.2.0

License

MIT

Unpacked Size

7.07 kB

Total Files

6

Last publish

Collaborators

  • bwardrop