mmpSearch/assets/js/creations/server/node_modules/cookie-signature
JotaChina 07562989cf
Deploy / Deploy (push) Successful in 1m16s Details
sync mode on
2025-10-26 16:43:01 -03:00
..
History.md sync mode on 2025-10-26 16:43:01 -03:00
LICENSE sync mode on 2025-10-26 16:43:01 -03:00
Readme.md sync mode on 2025-10-26 16:43:01 -03:00
index.js sync mode on 2025-10-26 16:43:01 -03:00
package.json sync mode on 2025-10-26 16:43:01 -03:00

Readme.md

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.