Huge news!Announcing our $20M Series A led by Andreessen Horowitz.Learn more
Socket
Socket
Log inDemoInstall

cookie-signature

Package Overview
Dependencies
0
Maintainers
3
Versions
12
Issues
File Explorer

Advanced tools

Install Socket

Protect your apps from supply chain attacks

Install

cookie-signature

Sign and unsign cookies

    1.2.1latest
    GitHub
    npm

Version published
Maintainers
3
Weekly downloads
26,692,379
decreased by-7.4%

Weekly downloads

Readme

Source

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.

Keywords

FAQs

Last updated on 27 Feb 2023

Did you know?

Socket installs a GitHub app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install
SocketSocket SOC 2 Logo

Product

  • Package Issues
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc