git-subtree-dir: main-site git-subtree-mainline: 4d1daa39101c0a85ca6d916f1c31139faf39632a git-subtree-split: 5cefb4d1618bc54ae0e86830421a8c911900302c
24 lines
427 B
Markdown
24 lines
427 B
Markdown
|
|
# cookie-signature
|
|
|
|
Sign and unsign cookies.
|
|
|
|
## Example
|
|
|
|
```js
|
|
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.
|