Nebulous Puffy Marshmallows

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

    1.2.0 • 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.

    Install

    npm i cookie-signature

    DownloadsWeekly Downloads

    22,783,882

    Version

    1.2.0

    License

    MIT

    Unpacked Size

    4.29 kB

    Total Files

    5

    Last publish

    Collaborators

    • natevw
    • tjholowaychuk
    • dougwilson