nodejs-video-streamer/node_modules/cookie-signature
2025-09-26 16:57:09 +05:30
..
History.md A Simple Node JS code to stream video files 2025-09-26 16:57:09 +05:30
index.js A Simple Node JS code to stream video files 2025-09-26 16:57:09 +05:30
LICENSE A Simple Node JS code to stream video files 2025-09-26 16:57:09 +05:30
package.json A Simple Node JS code to stream video files 2025-09-26 16:57:09 +05:30
Readme.md A Simple Node JS code to stream video files 2025-09-26 16:57:09 +05:30

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.